Take into account sub modules
This commit is contained in:
parent
1768efa333
commit
6985d13a97
4 changed files with 34 additions and 10 deletions
|
|
@ -19,3 +19,9 @@ fn main() {
|
|||
// False positive #5154, shouldn't trigger lint.
|
||||
m!();
|
||||
}
|
||||
|
||||
mod hello_mod {
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn hello_mod() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,3 +19,9 @@ fn main() {
|
|||
// False positive #5154, shouldn't trigger lint.
|
||||
m!();
|
||||
}
|
||||
|
||||
mod hello_mod {
|
||||
use regex;
|
||||
#[allow(dead_code)]
|
||||
fn hello_mod() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,5 +6,11 @@ LL | use regex;
|
|||
|
|
||||
= note: `-D clippy::single-component-path-imports` implied by `-D warnings`
|
||||
|
||||
error: aborting due to previous error
|
||||
error: this import is redundant
|
||||
--> $DIR/single_component_path_imports.rs:24:5
|
||||
|
|
||||
LL | use regex;
|
||||
| ^^^^^^^^^^ help: remove it entirely
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue