]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unused/unused-macro.rs
Auto merge of #81507 - weiznich:add_diesel_to_cargo_test, r=Mark-Simulacrum
[rust.git] / src / test / ui / unused / unused-macro.rs
1 #![feature(decl_macro)]
2 #![deny(unused_macros)]
3
4 // Most simple case
5 macro unused { //~ ERROR: unused macro definition
6     () => {}
7 }
8
9 #[allow(unused_macros)]
10 mod bar {
11     // Test that putting the #[deny] close to the macro's definition
12     // works.
13
14     #[deny(unused_macros)]
15     macro unused { //~ ERROR: unused macro definition
16         () => {}
17     }
18 }
19
20 mod boo {
21     pub(crate) macro unused { //~ ERROR: unused macro definition
22         () => {}
23     }
24 }
25
26 fn main() {}