]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/single_component_path_imports_macro.rs
Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23
[rust.git] / src / tools / clippy / tests / ui / single_component_path_imports_macro.rs
1 // run-rustfix
2 #![warn(clippy::single_component_path_imports)]
3 #![allow(unused_imports)]
4
5 // #7106: use statements exporting a macro within a crate should not trigger lint
6
7 macro_rules! m1 {
8     () => {};
9 }
10 pub(crate) use m1; // ok
11
12 macro_rules! m2 {
13     () => {};
14 }
15 use m2; // fail
16
17 fn main() {
18     m1!();
19     m2!();
20 }