]> git.lizzy.rs Git - rust.git/blob - tests/ui/single_component_path_imports_macro.rs
Allow `single_component_path_imports` for all macros
[rust.git] / tests / ui / single_component_path_imports_macro.rs
1 #![warn(clippy::single_component_path_imports)]
2 #![allow(unused_imports)]
3
4 // #7106: use statements exporting a macro within a crate should not trigger lint
5 // #7923: normal `use` statements of macros should also not trigger the lint
6
7 macro_rules! m1 {
8     () => {};
9 }
10 pub(crate) use m1; // ok
11
12 macro_rules! m2 {
13     () => {};
14 }
15 use m2; // ok
16
17 fn main() {
18     m1!();
19     m2!();
20 }