aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/macros/builtin/option_env3.rs
blob: ad6dd4c21da2dc3af31bd03ef3474eefd21646d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#![feature(rustc_attrs)]

#[rustc_builtin_macro]
macro_rules! option_env {
    () => {}
}

#[lang = "sized"]
trait Sized {}

pub mod core {
    pub mod option {
        pub enum Option<T> {
            #[lang = "Some"]
            Some(T),
            #[lang = "None"]
            None,
        }
    }
}

use core::option::Option;


fn main() {
    let _: Option<&str> = option_env!("A","B");
    // { dg-error "'option_env!' takes 1 argument" "" { target *-*-* } .-1 }
}