Rollup merge of #67127 - estebank:disambiguate-suggestion, r=varkor

Use structured suggestion for disambiguating method calls

Fix #65635.
This commit is contained in:
Mazdak Farrokhzad 2019-12-20 12:17:20 +01:00 committed by GitHub
commit f0eb4b4752
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 274 additions and 82 deletions

View file

@ -9,13 +9,19 @@ note: candidate #1 is defined in an impl of the trait `Trait1` for the type `Tes
|
LL | fn foo() {}
| ^^^^^^^^
= help: to disambiguate the method call, write `Trait1::foo(...)` instead
note: candidate #2 is defined in an impl of the trait `Trait2` for the type `Test`
--> $DIR/E0034.rs:16:5
|
LL | fn foo() {}
| ^^^^^^^^
= help: to disambiguate the method call, write `Trait2::foo(...)` instead
help: disambiguate the method call for candidate #1
|
LL | Trait1::foo()
| ^^^^^^^^^^^
help: disambiguate the method call for candidate #2
|
LL | Trait2::foo()
| ^^^^^^^^^^^
error: aborting due to previous error