Rollup merge of #67127 - estebank:disambiguate-suggestion, r=varkor
Use structured suggestion for disambiguating method calls Fix #65635.
This commit is contained in:
commit
f0eb4b4752
18 changed files with 274 additions and 82 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue