Debian Codegraph @

gcc/testsuite/rust/compile/macros/builtin/option_env1.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 // Both a guaranteed-to-exist variable and a failed find should compile
27 let _: Option<&str> = option_env!("PWD");
28 let _: Option<&str> = option_env!("PROBABLY_DOESNT_EXIST");
29 }