2015-04-16 07:48:31 -05:00
|
|
|
// Test that `#[rustc_*]` attributes are gated by `rustc_attrs` feature gate.
|
|
|
|
|
2019-06-30 05:00:45 -05:00
|
|
|
#![feature(decl_macro)]
|
|
|
|
|
|
|
|
mod rustc { pub macro unknown() {} }
|
|
|
|
mod unknown { pub macro rustc() {} }
|
|
|
|
|
|
|
|
#[rustc::unknown]
|
|
|
|
//~^ ERROR attributes starting with `rustc` are reserved for use by the `rustc` compiler
|
|
|
|
//~| ERROR macro `rustc::unknown` may not be used in attributes
|
|
|
|
fn f() {}
|
|
|
|
|
|
|
|
#[unknown::rustc]
|
|
|
|
//~^ ERROR attributes starting with `rustc` are reserved for use by the `rustc` compiler
|
|
|
|
//~| ERROR macro `unknown::rustc` may not be used in attributes
|
|
|
|
fn g() {}
|
|
|
|
|
2019-06-29 06:06:22 -05:00
|
|
|
#[rustc_dummy]
|
|
|
|
//~^ ERROR used by the test suite
|
2019-06-30 05:00:45 -05:00
|
|
|
#[rustc_unknown]
|
|
|
|
//~^ ERROR attributes starting with `rustc` are reserved for use by the `rustc` compiler
|
|
|
|
//~| ERROR attribute `rustc_unknown` is currently unknown
|
2015-04-16 07:48:31 -05:00
|
|
|
fn main() {}
|