]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/soft-syntax-gates-with-errors.rs
parser will not give wrong help message for 'public'
[rust.git] / src / test / ui / feature-gates / soft-syntax-gates-with-errors.rs
1 // check-fail
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 macro a() {}
6 //~^ ERROR: `macro` is experimental
7
8 #[cfg(FALSE)]
9 macro b() {}
10
11 macro_rules! identity {
12     ($($x:tt)*) => ($($x)*);
13 }
14
15 identity! {
16     macro c() {}
17     //~^ ERROR: `macro` is experimental
18 }
19
20 #[cfg(FALSE)]
21 identity! {
22     macro d() {} // No error
23 }
24
25 identity! {
26     #[cfg(FALSE)]
27     macro e() {}
28 }
29
30 fn main() {}