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