about summary refs log tree commit diff
path: root/src/test/ui/binding
diff options
context:
space:
mode:
authorpierwill <pierwill@users.noreply.github.com>2021-10-20 08:56:10 -0500
committerpierwill <pierwill@users.noreply.github.com>2021-10-25 20:33:07 -0500
commit7de1ff1ba8a75c70e1a9ddde671abd9780d1addb (patch)
treec47fa7c179f9e013b51195d86cf1e4172624e72d /src/test/ui/binding
parent84c2a8505dcdfa0e38e05f72066480ea51ba9cbd (diff)
downloadrust-7de1ff1ba8a75c70e1a9ddde671abd9780d1addb.tar.gz
rust-7de1ff1ba8a75c70e1a9ddde671abd9780d1addb.zip
Edit error messages for rustc_resolve::AmbiguityKind variants
Emit description of the ambiguity as a note.

Co-authored-by: Noah Lev <camelidcamel@gmail.com>
Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
Diffstat (limited to 'src/test/ui/binding')
-rw-r--r--src/test/ui/binding/ambiguity-item.stderr6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/ui/binding/ambiguity-item.stderr b/src/test/ui/binding/ambiguity-item.stderr
index 615193c0d02..f3620139642 100644
--- a/src/test/ui/binding/ambiguity-item.stderr
+++ b/src/test/ui/binding/ambiguity-item.stderr
@@ -1,9 +1,10 @@
-error[E0659]: `f` is ambiguous (glob import vs glob import in the same module)
+error[E0659]: `f` is ambiguous
   --> $DIR/ambiguity-item.rs:14:13
    |
 LL |     let v = f;
    |             ^ ambiguous name
    |
+   = note: ambiguous because of multiple glob imports of a name in the same module
 note: `f` could refer to the function imported here
   --> $DIR/ambiguity-item.rs:6:5
    |
@@ -17,12 +18,13 @@ LL | use n::*; // OK, no conflict with `use m::*;`
    |     ^^^^
    = help: consider adding an explicit import of `f` to disambiguate
 
-error[E0659]: `f` is ambiguous (glob import vs glob import in the same module)
+error[E0659]: `f` is ambiguous
   --> $DIR/ambiguity-item.rs:16:9
    |
 LL |         f => {}
    |         ^ ambiguous name
    |
+   = note: ambiguous because of multiple glob imports of a name in the same module
 note: `f` could refer to the function imported here
   --> $DIR/ambiguity-item.rs:6:5
    |