From cef736f8a05bab8d9a16f7120b5800670ef768ee Mon Sep 17 00:00:00 2001 From: Hirochika Matsumoto Date: Sun, 26 Sep 2021 00:53:37 +0900 Subject: 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. --- src/test/ui/error-codes/E0407.stderr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/test/ui/error-codes') diff --git a/src/test/ui/error-codes/E0407.stderr b/src/test/ui/error-codes/E0407.stderr index 567fc879040..6f6d1ff6a8f 100644 --- a/src/test/ui/error-codes/E0407.stderr +++ b/src/test/ui/error-codes/E0407.stderr @@ -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 -- cgit 1.4.1-3-g733a5