]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/issue-43106-gating-of-macro_use.rs
Auto merge of #94286 - matthiaskrgr:rollup-6i1spjg, r=matthiaskrgr
[rust.git] / src / test / ui / feature-gates / issue-43106-gating-of-macro_use.rs
1 // This is just a check-list of the cases where feeding arguments to
2 // `#[macro_use]` is rejected. (The cases where no error is emitted
3 // corresponds to cases where the attribute is currently unused, so we
4 // get that warning; see issue-43106-gating-of-builtin-attrs.rs
5
6 #![macro_use(my_macro)]
7 //~^ ERROR arguments to `macro_use` are not allowed here
8
9 #[macro_use(my_macro)]
10 //~^ ERROR arguments to `macro_use` are not allowed here
11 mod macro_escape {
12     mod inner { #![macro_use(my_macro)] }
13     //~^ ERROR arguments to `macro_use` are not allowed here
14
15     #[macro_use = "2700"] struct S;
16     //~^ ERROR malformed `macro_use` attribute
17
18     #[macro_use] fn f() { }
19
20     #[macro_use] type T = S;
21
22     #[macro_use] impl S { }
23 }
24
25 fn main() { }