forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#121958 - chenyukang:yukang-fix-121915-impor…
…t, r=pnkfelix Fix redundant import errors for preload extern crate Fixes rust-lang#121915
- Loading branch information
Showing
11 changed files
with
107 additions
and
3 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
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 @@ | ||
pub fn item() {} |
14 changes: 14 additions & 0 deletions
14
tests/ui/imports/redundant-import-issue-121915-2015.edition2015.stderr
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 @@ | ||
error: the item `aux_issue_121915` is already exists in the extern prelude | ||
--> $DIR/redundant-import-issue-121915-2015.rs:10:9 | ||
| | ||
LL | use aux_issue_121915; | ||
| ^^^^^^^^^^^^^^^^ help: remove this import | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/redundant-import-issue-121915-2015.rs:8:8 | ||
| | ||
LL | #[deny(unused_imports)] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//@ compile-flags: --extern aux_issue_121915 --edition 2015 | ||
//@ aux-build: aux-issue-121915.rs | ||
|
||
extern crate aux_issue_121915; | ||
|
||
#[deny(unused_imports)] | ||
fn main() { | ||
use aux_issue_121915; | ||
//~^ ERROR the item `aux_issue_121915` is already exists in the extern prelude | ||
aux_issue_121915::item(); | ||
} |
14 changes: 14 additions & 0 deletions
14
tests/ui/imports/redundant-import-issue-121915-2015.stderr
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 @@ | ||
error: the item `aux_issue_121915` is already exists in the extern prelude | ||
--> $DIR/redundant-import-issue-121915-2015.rs:8:9 | ||
| | ||
LL | use aux_issue_121915; | ||
| ----^^^^^^^^^^^^^^^^- help: remove this import | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/redundant-import-issue-121915-2015.rs:6:8 | ||
| | ||
LL | #[deny(unused_imports)] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
|
9 changes: 9 additions & 0 deletions
9
tests/ui/imports/redundant-import-issue-121915.edition2015.stderr
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,9 @@ | ||
error[E0432]: unresolved import `aux_issue_121915` | ||
--> $DIR/redundant-import-issue-121915.rs:10:9 | ||
| | ||
LL | use aux_issue_121915; | ||
| ^^^^^^^^^^^^^^^^ no `aux_issue_121915` in the root | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0432`. |
14 changes: 14 additions & 0 deletions
14
tests/ui/imports/redundant-import-issue-121915.edition2018.stderr
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 @@ | ||
error: the item `aux_issue_121915` is already exists in the extern prelude | ||
--> $DIR/redundant-import-issue-121915.rs:9:9 | ||
| | ||
LL | use aux_issue_121915; | ||
| ----^^^^^^^^^^^^^^^^- help: remove this import | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/redundant-import-issue-121915.rs:7:8 | ||
| | ||
LL | #[deny(unused_imports)] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
|
14 changes: 14 additions & 0 deletions
14
tests/ui/imports/redundant-import-issue-121915.edition2021.stderr
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 @@ | ||
error: the item `aux_issue_121915` is already exists in the extern prelude | ||
--> $DIR/redundant-import-issue-121915.rs:9:9 | ||
| | ||
LL | use aux_issue_121915; | ||
| ----^^^^^^^^^^^^^^^^- help: remove this import | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/redundant-import-issue-121915.rs:7:8 | ||
| | ||
LL | #[deny(unused_imports)] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//@ revisions: edition2018 edition2021 | ||
//@ [edition2018] edition:2018 | ||
//@ [edition2021] edition:2021 | ||
//@ compile-flags: --extern aux_issue_121915 | ||
//@ aux-build: aux-issue-121915.rs | ||
|
||
#[deny(unused_imports)] | ||
fn main() { | ||
use aux_issue_121915; | ||
//~^ ERROR the item `aux_issue_121915` is already exists in the extern prelude | ||
aux_issue_121915::item(); | ||
} |