Skip to content

Commit 3de3aad

Browse files
authored
Rollup merge of rust-lang#57551 - petrochenkov:regrtest, r=nikomatsakis
resolve: Add a test for issue rust-lang#57539 Add a test for the bugfix regression reported in rust-lang#57539 Closes rust-lang#57539
2 parents 8944789 + ebdd072 commit 3de3aad

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/test/ui/imports/issue-57539.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// edition:2018
2+
3+
mod core {
4+
use core; //~ ERROR `core` is ambiguous
5+
use crate::*;
6+
}
7+
8+
fn main() {}
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
error[E0659]: `core` is ambiguous (name vs any other name during import resolution)
2+
--> $DIR/issue-57539.rs:4:9
3+
|
4+
LL | use core; //~ ERROR `core` is ambiguous
5+
| ^^^^ ambiguous name
6+
|
7+
= note: `core` could refer to a built-in extern crate
8+
= help: use `::core` to refer to this extern crate unambiguously
9+
note: `core` could also refer to the module imported here
10+
--> $DIR/issue-57539.rs:5:9
11+
|
12+
LL | use crate::*;
13+
| ^^^^^^^^
14+
= help: use `self::core` to refer to this module unambiguously
15+
16+
error: aborting due to previous error
17+
18+
For more information about this error, try `rustc --explain E0659`.

0 commit comments

Comments
 (0)