]> git.lizzy.rs Git - rust.git/blob - tests/ui/single_component_path_imports_macro.rs
Auto merge of #7120 - cherryblossom000:7106, r=Manishearth
[rust.git] / tests / ui / single_component_path_imports_macro.rs
1 // run-rustfix
2 // edition:2018
3 #![warn(clippy::single_component_path_imports)]
4 #![allow(unused_imports)]
5
6 // #7106: use statements exporting a macro within a crate should not trigger lint
7
8 macro_rules! m1 {
9     () => {};
10 }
11 pub(crate) use m1; // ok
12
13 macro_rules! m2 {
14     () => {};
15 }
16 use m2; // fail
17
18 fn main() {
19     m1!();
20     m2!();
21 }