-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #60252 - davidtwco:issue-57672, r=Mark-Simulacrum
Don't suggest changing extern crate w/ alias to use. Fixes #57672.
- Loading branch information
Showing
10 changed files
with
54 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// aux-build:foo.rs | ||
// compile-flags:--extern foo | ||
// compile-pass | ||
// edition:2018 | ||
|
||
#![deny(unused_extern_crates)] | ||
|
||
extern crate foo as foo_renamed; | ||
|
||
pub mod m { | ||
pub use foo_renamed::Foo; | ||
} | ||
|
||
fn main() {} |