diff options
| author | bors <bors@rust-lang.org> | 2018-12-29 10:17:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-29 10:17:10 +0000 |
| commit | d5175f4405029cf456ca0cd44b438a7f86ffdc06 (patch) | |
| tree | ad58cce3e53053f33a8c2c574c8a7e9b05795f07 /src/test | |
| parent | 35a64f8bbfab3e063754cc9fc51a6ad795269b50 (diff) | |
| parent | ce73bc7d47fc58d5e1436df10b2a2ceaddf511bd (diff) | |
| download | rust-d5175f4405029cf456ca0cd44b438a7f86ffdc06.tar.gz rust-d5175f4405029cf456ca0cd44b438a7f86ffdc06.zip | |
Auto merge of #57160 - petrochenkov:impice2, r=estebank
resolve: Fix an ICE in import validation Fixes ICE reported in the comment https://github.com/rust-lang/rust/issues/56596#issuecomment-449866807
Diffstat (limited to 'src/test')
3 files changed, 33 insertions, 0 deletions
diff --git a/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-56596.rs b/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-56596.rs new file mode 100644 index 00000000000..bc010a3dd2b --- /dev/null +++ b/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-56596.rs @@ -0,0 +1 @@ +// Nothing here diff --git a/src/test/ui/rust-2018/uniform-paths/issue-56596.rs b/src/test/ui/rust-2018/uniform-paths/issue-56596.rs new file mode 100644 index 00000000000..5c40d78d81c --- /dev/null +++ b/src/test/ui/rust-2018/uniform-paths/issue-56596.rs @@ -0,0 +1,14 @@ +// edition:2018 +// compile-flags: --extern issue_56596 +// aux-build:issue-56596.rs + +#![feature(uniform_paths)] + +mod m { + pub mod issue_56596 {} +} + +use m::*; +use issue_56596; //~ ERROR `issue_56596` is ambiguous + +fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr b/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr new file mode 100644 index 00000000000..293d0ec6a72 --- /dev/null +++ b/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr @@ -0,0 +1,18 @@ +error[E0659]: `issue_56596` is ambiguous (name vs any other name during import resolution) + --> $DIR/issue-56596.rs:12:5 + | +LL | use issue_56596; //~ ERROR `issue_56596` is ambiguous + | ^^^^^^^^^^^ ambiguous name + | + = note: `issue_56596` could refer to an extern crate passed with `--extern` + = help: use `::issue_56596` to refer to this extern crate unambiguously +note: `issue_56596` could also refer to the module imported here + --> $DIR/issue-56596.rs:11:5 + | +LL | use m::*; + | ^^^^ + = help: use `crate::issue_56596` to refer to this module unambiguously + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0659`. |
