]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/cfg-eval-inner.rs
Rollup merge of #106591 - Ezrashaw:attempted-integer-identifer, r=Estebank
[rust.git] / tests / ui / proc-macro / cfg-eval-inner.rs
1 // compile-flags: -Z span-debug
2 // aux-build:test-macros.rs
3 // check-pass
4
5 #![feature(cfg_eval)]
6 #![feature(custom_inner_attributes)]
7 #![feature(stmt_expr_attributes)]
8 #![feature(rustc_attrs)]
9
10 #![no_std] // Don't load unnecessary hygiene information from std
11 extern crate std;
12
13 #[macro_use]
14 extern crate test_macros;
15
16 struct Foo<T>(T);
17
18 impl Foo<[u8; {
19     #![cfg_attr(not(FALSE), rustc_dummy(cursed_inner))]
20     #![allow(unused)]
21     struct Inner {
22         field: [u8; {
23             #![cfg_attr(not(FALSE), rustc_dummy(another_cursed_inner))]
24             1
25         }]
26     }
27
28     0
29 }]> {
30     #![cfg_eval]
31     #![print_attr]
32     #![cfg_attr(not(FALSE), rustc_dummy(evaluated_attr))]
33
34     fn bar() {
35         #[cfg(FALSE)] let a = 1;
36     }
37 }
38
39 fn main() {}