1 // Test that `#[rustc_*]` attributes are gated by `rustc_attrs` feature gate.
3 #![feature(decl_macro)]
5 mod rustc { pub macro unknown() {} }
6 mod unknown { pub macro rustc() {} }
9 //~^ ERROR attributes starting with `rustc` are reserved for use by the `rustc` compiler
10 //~| ERROR expected attribute, found macro `rustc::unknown`
14 //~^ ERROR attributes starting with `rustc` are reserved for use by the `rustc` compiler
15 //~| ERROR expected attribute, found macro `unknown::rustc`
19 //~^ ERROR the `#[rustc_dummy]` attribute is just used for rustc unit tests
21 //~^ ERROR attributes starting with `rustc` are reserved for use by the `rustc` compiler
22 //~| ERROR cannot find attribute `rustc_unknown` in this scope