Skip to content

Commit

Permalink
Remove extern crate semver.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongmao86 committed Jan 29, 2020
1 parent 2b718ee commit 0861f0b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
1 change: 0 additions & 1 deletion tests/ui/single_component_use_path.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// compile-flags: --edition 2018
#![warn(clippy::single_component_use_path)]

extern crate semver;


fn main() {
Expand Down
1 change: 0 additions & 1 deletion tests/ui/single_component_use_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// compile-flags: --edition 2018
#![warn(clippy::single_component_use_path)]

extern crate semver;
use semver;

fn main() {
Expand Down
14 changes: 5 additions & 9 deletions tests/ui/single_component_use_path.stderr
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
error[E0254]: the name `semver` is defined multiple times
--> $DIR/single_component_use_path.rs:6:5
error[E0432]: unresolved import `semver`
--> $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
| ^^^^^^ no `semver` external crate

error: this import is redundant
--> $DIR/single_component_use_path.rs:6:1
--> $DIR/single_component_use_path.rs:5:1
|
LL | use semver;
| ^^^^^^^^^^^ help: remove it entirely
Expand All @@ -18,4 +14,4 @@ LL | use semver;

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0254`.
For more information about this error, try `rustc --explain E0432`.

0 comments on commit 0861f0b

Please sign in to comment.