gcc/testsuite/rust/compile/macros/builtin/option_env3.rs
raw| 1 | #![feature(rustc_attrs)] |
| 2 | |
| 3 | #[rustc_builtin_macro] |
| 4 | macro_rules! option_env { |
| 5 | () => {} |
| 6 | } |
| 7 | |
| 8 | #[lang = "sized"] |
| 9 | trait Sized {} |
| 10 | |
| 11 | pub mod core { |
| 12 | pub mod option { |
| 13 | pub enum Option<T> { |
| 14 | #[lang = "Some"] |
| 15 | Some(T), |
| 16 | #[lang = "None"] |
| 17 | None, |
| 18 | } |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | use core::option::Option; |
| 23 | |
| 24 | |
| 25 | fn main() { |
| 26 | let _: Option<&str> = option_env!("A","B"); |
| 27 | // { dg-error "'option_env!' takes 1 argument" "" { target *-*-* } .-1 } |
| 28 | } |