2018-02-24 19:11:06 -08:00
|
|
|
// aux-build:unstable-macros.rs
|
|
|
|
|
2019-06-22 02:44:45 +03:00
|
|
|
#![feature(decl_macro)]
|
2018-02-24 19:11:06 -08:00
|
|
|
#![feature(staged_api)]
|
|
|
|
#[macro_use] extern crate unstable_macros;
|
|
|
|
|
2019-12-21 13:16:18 +02:00
|
|
|
#[unstable(feature = "local_unstable", issue = "none")]
|
2018-02-24 19:11:06 -08:00
|
|
|
macro_rules! local_unstable { () => () }
|
|
|
|
|
2019-12-21 13:16:18 +02:00
|
|
|
#[unstable(feature = "local_unstable", issue = "none")]
|
2019-06-22 02:44:45 +03:00
|
|
|
macro local_unstable_modern() {}
|
|
|
|
|
|
|
|
#[stable(feature = "deprecated_macros", since = "1.0.0")]
|
|
|
|
#[rustc_deprecated(since = "1.0.0", reason = "local deprecation reason")]
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! local_deprecated{ () => () }
|
|
|
|
|
2018-02-24 19:11:06 -08:00
|
|
|
fn main() {
|
2019-06-22 00:18:09 +03:00
|
|
|
local_unstable!(); //~ ERROR use of unstable library feature 'local_unstable'
|
2019-06-22 02:44:45 +03:00
|
|
|
local_unstable_modern!(); //~ ERROR use of unstable library feature 'local_unstable'
|
2019-06-22 00:18:09 +03:00
|
|
|
unstable_macro!(); //~ ERROR use of unstable library feature 'unstable_macros'
|
2019-06-22 02:44:45 +03:00
|
|
|
// unstable_macro_modern!(); // ERROR use of unstable library feature 'unstable_macros'
|
|
|
|
|
|
|
|
deprecated_macro!();
|
2020-07-25 13:49:46 -04:00
|
|
|
//~^ WARN use of deprecated macro `deprecated_macro`: deprecation reason
|
2019-06-22 02:44:45 +03:00
|
|
|
local_deprecated!();
|
2020-07-25 13:49:46 -04:00
|
|
|
//~^ WARN use of deprecated macro `local_deprecated`: local deprecation reason
|
2018-02-24 19:11:06 -08:00
|
|
|
}
|