]>
Commit | Line | Data |
---|---|---|
5869c6ff XL |
1 | // check-pass |
2 | // edition:2018 | |
3 | // compile-flags: -Z span-debug | |
4 | // aux-build:test-macros.rs | |
5 | ||
6 | #![feature(rustc_attrs)] | |
7 | ||
8 | #![no_std] // Don't load unnecessary hygiene information from std | |
9 | extern crate std; | |
10 | ||
11 | #[macro_use] extern crate test_macros; | |
12 | ||
13 | macro_rules! capture_item { | |
14 | ($item:item) => { | |
15 | #[print_attr] | |
16 | $item | |
17 | } | |
18 | } | |
19 | ||
20 | capture_item! { | |
21 | /// A doc comment | |
22 | struct Foo {} | |
23 | } | |
24 | ||
25 | capture_item! { | |
26 | #[rustc_dummy] | |
27 | /// Another comment comment | |
28 | struct Bar {} | |
29 | } | |
30 | ||
31 | fn main() {} |