diff options
Diffstat (limited to 'tests/ui/proc-macro/nested-derive-cfg.rs')
-rw-r--r-- | tests/ui/proc-macro/nested-derive-cfg.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/nested-derive-cfg.rs b/tests/ui/proc-macro/nested-derive-cfg.rs new file mode 100644 index 000000000..53cfbb7c9 --- /dev/null +++ b/tests/ui/proc-macro/nested-derive-cfg.rs @@ -0,0 +1,23 @@ +// compile-flags: -Z span-debug --error-format human +// aux-build:test-macros.rs +// check-pass + +#![no_std] // Don't load unnecessary hygiene information from std +extern crate std; + +#[macro_use] +extern crate test_macros; + +#[derive(Print)] +struct Foo { + #[cfg(FALSE)] removed: bool, + my_array: [bool; { + struct Inner { + #[cfg(FALSE)] removed_inner_field: u8, + non_removed_inner_field: usize + } + 0 + }] +} + +fn main() {} |