Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not suggest use over extern crate w/ alias.
This commit stops `unused_extern_crates` lints from occuring on `extern crate` statements that alias the crate as the suggestion to change to a `use` statement would result in the aliased name no longer being added to the prelude, thereby causing compilation errors if other imports expected this to be the case.
- Loading branch information
Showing
11 changed files
with
41 additions
and
66 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
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,38 +1,14 @@ | ||
error: `extern crate` is not idiomatic in the new edition | ||
--> $DIR/extern-crate-used.rs:8:1 | ||
error: unused extern crate | ||
--> $DIR/extern-crate-used.rs:18:1 | ||
| | ||
LL | extern crate core as iso1; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` | ||
LL | extern crate core; | ||
| ^^^^^^^^^^^^^^^^^^ help: remove it | ||
| | ||
note: lint level defined here | ||
--> $DIR/extern-crate-used.rs:6:9 | ||
| | ||
LL | #![deny(unused_extern_crates)] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `extern crate` is not idiomatic in the new edition | ||
--> $DIR/extern-crate-used.rs:9:1 | ||
| | ||
LL | extern crate core as iso2; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` | ||
|
||
error: `extern crate` is not idiomatic in the new edition | ||
--> $DIR/extern-crate-used.rs:10:1 | ||
| | ||
LL | extern crate core as iso3; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` | ||
|
||
error: `extern crate` is not idiomatic in the new edition | ||
--> $DIR/extern-crate-used.rs:11:1 | ||
| | ||
LL | extern crate core as iso4; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` | ||
|
||
error: unused extern crate | ||
--> $DIR/extern-crate-used.rs:14:1 | ||
| | ||
LL | extern crate core; | ||
| ^^^^^^^^^^^^^^^^^^ help: remove it | ||
|
||
error: aborting due to 5 previous errors | ||
error: aborting due to previous error | ||
|
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
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
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
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 was deleted.
Oops, something went wrong.