-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b8fc3c7
commit 6db5b20
Showing
3 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// run-rustfix | ||
// compile-flags: --edition 2018 | ||
#![warn(clippy::single_component_use_path)] | ||
|
||
extern crate semver; | ||
|
||
|
||
fn main() { | ||
let escaped = std::ascii::escape_default(b'\t'); | ||
println!("{}", escaped); | ||
let version = semver::Version::parse("1.2.3").unwrap(); | ||
println!("Version: {}", version); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
error: this import is redundant in 2018 edition | ||
error[E0254]: the name `semver` is defined multiple times | ||
--> $DIR/single_component_use_path.rs:5:5 | ||
| | ||
LL | extern crate semver; | ||
| -------------------- previous import of the extern crate `semver` here | ||
LL | use semver; | ||
| ^^^^^^ `semver` reimported here | ||
| | ||
= note: `semver` must be defined only once in the type namespace of this module | ||
|
||
error: this import is redundant | ||
--> $DIR/single_component_use_path.rs:5:1 | ||
| | ||
LL | use std; | ||
| ^^^^^^^^ help: remove it entirely | ||
LL | use semver; | ||
| ^^^^^^^^^^^ help: remove it entirely | ||
| | ||
= note: `-D clippy::single-component-use-path` implied by `-D warnings` | ||
|
||
error: aborting due to previous error | ||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0254`. |