mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-04 02:20:04 +00:00
22 lines
336 B
Rust
22 lines
336 B
Rust
|
// run-rustfix
|
||
|
// edition:2018
|
||
|
#![warn(clippy::single_component_path_imports)]
|
||
|
#![allow(unused_imports)]
|
||
|
|
||
|
// #7106: use statements exporting a macro within a crate should not trigger lint
|
||
|
|
||
|
macro_rules! m1 {
|
||
|
() => {};
|
||
|
}
|
||
|
pub(crate) use m1; // ok
|
||
|
|
||
|
macro_rules! m2 {
|
||
|
() => {};
|
||
|
}
|
||
|
use m2; // fail
|
||
|
|
||
|
fn main() {
|
||
|
m1!();
|
||
|
m2!();
|
||
|
}
|