]> git.lizzy.rs Git - rust.git/blob - tests/ui/feature-gates/soft-syntax-gates-without-errors.rs
Rollup merge of #106641 - chenyukang:yukang/fix-105761-segguest-this, r=estebank
[rust.git] / tests / ui / feature-gates / soft-syntax-gates-without-errors.rs
1 // check-pass
2 // This file is used to test the behavior of the early-pass syntax warnings.
3 // If macro syntax is stabilized, replace with a different unstable syntax.
4
5 #[cfg(FALSE)]
6 macro b() {}
7 //~^ WARN: `macro` is experimental
8 //~| WARN: unstable syntax
9
10 macro_rules! identity {
11     ($($x:tt)*) => ($($x)*);
12 }
13
14 #[cfg(FALSE)]
15 identity! {
16     macro d() {} // No error
17 }
18
19 identity! {
20     #[cfg(FALSE)]
21     macro e() {}
22     //~^ WARN: `macro` is experimental
23     //~| WARN: unstable syntax
24 }
25
26 fn main() {}