]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/attribute-after-derive.rs
Rollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr
[rust.git] / tests / 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 #![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 #[print_attr]
15 #[derive(Print)]
16 struct AttributeDerive {
17     #[cfg(FALSE)]
18     field: u8,
19 }
20
21 #[derive(Print)]
22 #[print_attr]
23 struct DeriveAttribute {
24     #[cfg(FALSE)]
25     field: u8,
26 }
27
28 fn main() {}