about summary refs log tree commit diff
path: root/src/test/ui/span
diff options
context:
space:
mode:
authorFabian Wolff <fabian.wolff@alumni.ethz.ch>2021-09-25 21:47:33 +0200
committerFabian Wolff <fabian.wolff@alumni.ethz.ch>2021-09-25 21:47:33 +0200
commit3d08ff1c19360e89a351184b9191454045059823 (patch)
tree24c3ddd7804ccebdb4f38234247ad48857c60ba8 /src/test/ui/span
parenta0648eab3686f100c7ab9b0d38472c740079cce4 (diff)
downloadrust-3d08ff1c19360e89a351184b9191454045059823.tar.gz
rust-3d08ff1c19360e89a351184b9191454045059823.zip
Fix incorrect disambiguation suggestion for associated items
Diffstat (limited to 'src/test/ui/span')
-rw-r--r--src/test/ui/span/issue-7575.stderr14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/ui/span/issue-7575.stderr b/src/test/ui/span/issue-7575.stderr
index 288c1042a26..783f5aca417 100644
--- a/src/test/ui/span/issue-7575.stderr
+++ b/src/test/ui/span/issue-7575.stderr
@@ -27,16 +27,16 @@ LL |     fn f9(_: usize) -> usize;
            candidate #3: `UnusedTrait`
 help: disambiguate the associated function for candidate #1
    |
-LL |     u.f8(42) + CtxtFn::f9(u, 342) + m.fff(42)
-   |                ~~~~~~~~~~~~~~~~~~
+LL |     u.f8(42) + <usize as CtxtFn>::f9(u, 342) + m.fff(42)
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
-LL |     u.f8(42) + OtherTrait::f9(u, 342) + m.fff(42)
-   |                ~~~~~~~~~~~~~~~~~~~~~~
+LL |     u.f8(42) + <usize as OtherTrait>::f9(u, 342) + m.fff(42)
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #3
    |
-LL |     u.f8(42) + UnusedTrait::f9(u, 342) + m.fff(42)
-   |                ~~~~~~~~~~~~~~~~~~~~~~~
+LL |     u.f8(42) + <usize as UnusedTrait>::f9(u, 342) + m.fff(42)
+   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0599]: no method named `fff` found for struct `Myisize` in the current scope
   --> $DIR/issue-7575.rs:62:30
@@ -72,7 +72,7 @@ LL |     fn is_str() -> bool {
    = help: items from traits can only be used if the type parameter is bounded by the trait
 help: disambiguate the associated function for the candidate
    |
-LL |     ManyImplTrait::is_str(t)
+LL |     <T as ManyImplTrait>::is_str(t)
    |
 
 error: aborting due to 3 previous errors