File tree Expand file tree Collapse file tree 2 files changed +6
-22
lines changed Expand file tree Collapse file tree 2 files changed +6
-22
lines changed Original file line number Diff line number Diff line change 22// compile-flags: --edition 2018
33#![warn(clippy::single_component_path_imports)]
44
5- use regex;
5+
66
77fn main() {
88 regex::Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap();
Original file line number Diff line number Diff line change 1- error[E0465]: multiple rlib candidates for `regex` found
2- --> $DIR/single_component_path_imports.rs:5:5
1+ error: this import is redundant
2+ --> $DIR/single_component_path_imports.rs:5:1
33 |
44LL | use regex;
5- | ^^^^^
5+ | ^^^^^^^^^^ help: remove it entirely
66 |
7- note: candidate #1: /home/rui/rust-clippy/target/debug/deps/libregex-eb8182d3b38305f5.rlib
8- --> $DIR/single_component_path_imports.rs:5:5
9- |
10- LL | use regex;
11- | ^^^^^
12- note: candidate #2: /home/rui/rust-clippy/target/debug/deps/libregex-ecf6ddab71485867.rlib
13- --> $DIR/single_component_path_imports.rs:5:5
14- |
15- LL | use regex;
16- | ^^^^^
17-
18- error[E0463]: can't find crate for `regex`
19- --> $DIR/single_component_path_imports.rs:5:5
20- |
21- LL | use regex;
22- | ^^^^^ can't find crate
7+ = note: `-D clippy::single-component-path-imports` implied by `-D warnings`
238
24- error: aborting due to 2 previous errors
9+ error: aborting due to previous error
2510
26- For more information about this error, try `rustc --explain E0463`.
You can’t perform that action at this time.
0 commit comments