Closed
Description
Code
trait A {
fn foo(&self);
}
trait B {
fn foo(&self);
}
struct S;
impl A for S {
fn foo(&self) {}
}
impl B for S {
fn foo(&self) {}
}
fn main() {
let s = S;
S::foo(&s);
}
Current output
help: disambiguate the method for candidate #1
|
21 | <&S as A>::foo(&s);
| ~~~~~~~~~~~
Desired output
help: disambiguate the method for candidate #1
|
21 | <S as A>::foo(&s);
| ~~~~~~~~~~~
Rationale and extra context
Current output has an extra &
in the suggested fix that fails compilation.
Other cases
No response
Anything else?
No response