]>
Commit | Line | Data |
---|---|---|
6a06907d XL |
1 | // check-pass |
2 | // compile-flags: -Z span-debug --error-format human | |
3 | // aux-build:test-macros.rs | |
4 | ||
5 | #![feature(rustc_attrs)] | |
6 | #![feature(stmt_expr_attributes)] | |
7 | ||
8 | #![no_std] // Don't load unnecessary hygiene information from std | |
9 | extern crate std; | |
10 | ||
11 | #[macro_use] | |
12 | extern crate test_macros; | |
13 | ||
14 | macro_rules! produce_it { | |
15 | ($expr:expr) => { | |
16 | #[derive(Print)] | |
17 | struct Foo { | |
18 | val: [bool; { | |
19 | let a = #[cfg_attr(not(FALSE), rustc_dummy(first))] $expr; | |
20 | 0 | |
21 | }] | |
22 | } | |
23 | } | |
24 | } | |
25 | ||
26 | produce_it!(#[cfg_attr(not(FALSE), rustc_dummy(second))] { | |
27 | #![cfg_attr(not(FALSE), allow(unused))] | |
28 | 30 | |
29 | }); | |
30 | ||
31 | fn main() {} |