]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/input-interpolated.rs
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / ui / proc-macro / input-interpolated.rs
1 // Check what token streams proc macros see when interpolated tokens are passed to them as input.
2
3 // check-pass
4 // edition:2018
5 // aux-build:test-macros.rs
6
7 #![no_std] // Don't load unnecessary hygiene information from std
8 extern crate std;
9
10 #[macro_use]
11 extern crate test_macros;
12
13 macro_rules! pass_ident {
14     ($i:ident) => {
15         fn f() {
16             print_bang!($i);
17         }
18
19         #[print_attr]
20         const $i: u8 = 0;
21
22         #[derive(Print)]
23         struct $i {}
24     };
25 }
26
27 pass_ident!(A);
28
29 fn main() {}