]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/macro-stability.rs
Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726
[rust.git] / tests / ui / macros / macro-stability.rs
1 // aux-build:unstable-macros.rs
2
3 #![feature(decl_macro)]
4 #![feature(staged_api)]
5 #![stable(feature = "rust1", since = "1.0.0")]
6
7 #[macro_use]
8 extern crate unstable_macros;
9
10 #[unstable(feature = "local_unstable", issue = "none")]
11 macro_rules! local_unstable { () => () }
12
13 #[unstable(feature = "local_unstable", issue = "none")]
14 macro local_unstable_modern() {}
15
16 #[stable(feature = "deprecated_macros", since = "1.0.0")]
17 #[deprecated(since = "1.0.0", note = "local deprecation note")]
18 #[macro_export]
19 macro_rules! local_deprecated{ () => () }
20
21 fn main() {
22     local_unstable!(); //~ ERROR use of unstable library feature 'local_unstable'
23     local_unstable_modern!(); //~ ERROR use of unstable library feature 'local_unstable'
24     unstable_macro!(); //~ ERROR use of unstable library feature 'unstable_macros'
25     // unstable_macro_modern!(); // ERROR use of unstable library feature 'unstable_macros'
26
27     deprecated_macro!();
28     //~^ WARN use of deprecated macro `deprecated_macro`: deprecation note
29     local_deprecated!();
30     //~^ WARN use of deprecated macro `local_deprecated`: local deprecation note
31 }