-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #105069, Add AmbiguityError for inconsistent resolution for an im…
…port
- Loading branch information
1 parent
703d95e
commit 795b2af
Showing
3 changed files
with
48 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use self::A::*; | ||
use V; //~ ERROR `V` is ambiguous | ||
use self::B::*; | ||
enum A { | ||
V | ||
} | ||
enum B { | ||
V | ||
} | ||
|
||
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,21 @@ | ||
error[E0659]: `V` is ambiguous | ||
--> $DIR/issue-105069.rs:2:5 | ||
| | ||
LL | use V; | ||
| ^ ambiguous name | ||
| | ||
= note: ambiguous because of multiple potential import sources | ||
note: `V` could refer to the variant imported here | ||
--> $DIR/issue-105069.rs:1:5 | ||
| | ||
LL | use self::A::*; | ||
| ^^^^^^^^^^ | ||
note: `V` could also refer to the variant imported here | ||
--> $DIR/issue-105069.rs:3:5 | ||
| | ||
LL | use self::B::*; | ||
| ^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0659`. |