-
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.
Rollup merge of #126568 - bvanjoi:fix-126376, r=petrochenkov
mark undetermined if target binding in current ns is not got Fixes #126376 Fixes #126389 Add a branch to handle more cases... r? `@petrochenkov`
- Loading branch information
Showing
7 changed files
with
101 additions
and
38 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
// https://github.com/rust-lang/rust/issues/126389 | ||
|
||
mod a { | ||
pub mod b { | ||
pub mod c {} | ||
} | ||
} | ||
|
||
use a::*; | ||
|
||
use b::c; | ||
//~^ ERROR: unresolved import `b::c` | ||
//~| ERROR: cannot determine resolution for the import | ||
//~| ERROR: cannot determine resolution for the import | ||
use c as b; | ||
|
||
fn c() {} | ||
|
||
fn main() { } |
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,23 @@ | ||
error: cannot determine resolution for the import | ||
--> $DIR/shadow-glob-module-resolution-3.rs:11:5 | ||
| | ||
LL | use b::c; | ||
| ^^^^ | ||
|
||
error: cannot determine resolution for the import | ||
--> $DIR/shadow-glob-module-resolution-3.rs:11:5 | ||
| | ||
LL | use b::c; | ||
| ^^^^ | ||
| | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
||
error[E0432]: unresolved import `b::c` | ||
--> $DIR/shadow-glob-module-resolution-3.rs:11:5 | ||
| | ||
LL | use b::c; | ||
| ^^^^ | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0432`. |
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,20 @@ | ||
// https://github.com/rust-lang/rust/issues/126376 | ||
|
||
mod a { | ||
pub mod b { | ||
pub trait C {} | ||
} | ||
} | ||
|
||
use a::*; | ||
|
||
use e as b; | ||
|
||
use b::C as e; | ||
//~^ ERROR: unresolved import `b::C` | ||
//~| ERROR: cannot determine resolution for the import | ||
//~| ERROR: cannot determine resolution for the import | ||
|
||
fn e() {} | ||
|
||
fn main() { } |
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,23 @@ | ||
error: cannot determine resolution for the import | ||
--> $DIR/shadow-glob-module-resolution-4.rs:13:5 | ||
| | ||
LL | use b::C as e; | ||
| ^^^^^^^^^ | ||
|
||
error: cannot determine resolution for the import | ||
--> $DIR/shadow-glob-module-resolution-4.rs:13:5 | ||
| | ||
LL | use b::C as e; | ||
| ^^^^^^^^^ | ||
| | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
||
error[E0432]: unresolved import `b::C` | ||
--> $DIR/shadow-glob-module-resolution-4.rs:13:5 | ||
| | ||
LL | use b::C as e; | ||
| ^^^^^^^^^ | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0432`. |