mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
Suggest similarly named assoc items in trait impls
Previously, the compiler didn't suggest similarly named associated items unlike we do in many situations. This patch adds such diagnostics for associated functions, types and constants.
This commit is contained in:
@@ -2,7 +2,10 @@ error[E0407]: method `b` is not a member of trait `Foo`
|
||||
--> $DIR/E0407.rs:9:5
|
||||
|
|
||||
LL | fn b() {}
|
||||
| ^^^^^^^^^ not a member of trait `Foo`
|
||||
| ^^^-^^^^^
|
||||
| | |
|
||||
| | help: there is an associated function with a similar name: `a`
|
||||
| not a member of trait `Foo`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
Reference in New Issue
Block a user