]> git.proxmox.com Git - rustc.git/blame - src/test/ui/proc-macro/issue-81007-item-attrs.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / proc-macro / issue-81007-item-attrs.rs
CommitLineData
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
9extern crate std;
10
11#[macro_use] extern crate test_macros;
12
13macro_rules! capture_item {
14 ($item:item) => {
15 #[print_attr]
16 $item
17 }
18}
19
20capture_item! {
21 /// A doc comment
22 struct Foo {}
23}
24
25capture_item! {
26 #[rustc_dummy]
27 /// Another comment comment
28 struct Bar {}
29}
30
31fn main() {}