]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/single_component_path_imports_macro.rs
Add 'library/portable-simd/' from commit '1ce1c645cf27c4acdefe6ec8a11d1f0491954a99'
[rust.git] / src / tools / clippy / 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 }