Fix FP in single_component_path_imports lint
This commit is contained in:
parent
8e56a2b27f
commit
1768efa333
4 changed files with 109 additions and 16 deletions
16
tests/ui/single_component_path_imports_self_after.rs
Normal file
16
tests/ui/single_component_path_imports_self_after.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// edition:2018
|
||||
#![warn(clippy::single_component_path_imports)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use self::regex::{Regex as xeger, RegexSet as tesxeger};
|
||||
pub use self::{
|
||||
regex::{Regex, RegexSet},
|
||||
some_mod::SomeType,
|
||||
};
|
||||
use regex;
|
||||
|
||||
mod some_mod {
|
||||
pub struct SomeType;
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
17
tests/ui/single_component_path_imports_self_before.rs
Normal file
17
tests/ui/single_component_path_imports_self_before.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// edition:2018
|
||||
#![warn(clippy::single_component_path_imports)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use regex;
|
||||
|
||||
use self::regex::{Regex as xeger, RegexSet as tesxeger};
|
||||
pub use self::{
|
||||
regex::{Regex, RegexSet},
|
||||
some_mod::SomeType,
|
||||
};
|
||||
|
||||
mod some_mod {
|
||||
pub struct SomeType;
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue