]> git.lizzy.rs Git - rust.git/blob - src/test/ui/proc-macro/attribute-after-derive.rs
Rollup merge of #87081 - a1phyr:add_wasi_ext_tracking_issue, r=dtolnay
[rust.git] / src / test / ui / proc-macro / attribute-after-derive.rs
1 // Macro attributes are allowed after `#[derive]` and
2 // `#[derive]` fully configures the item for following attributes.
3
4 // check-pass
5 // compile-flags: -Z span-debug
6 // aux-build: test-macros.rs
7
8 #![feature(macro_attributes_in_derive_output)]
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 #[print_attr]
17 #[derive(Print)]
18 struct AttributeDerive {
19     #[cfg(FALSE)]
20     field: u8,
21 }
22
23 #[derive(Print)]
24 #[print_attr]
25 struct DeriveAttribute {
26     #[cfg(FALSE)]
27     field: u8,
28 }
29
30 fn main() {}