diff options
| author | Hirochika Matsumoto <git@hkmatsumoto.com> | 2021-09-26 00:53:37 +0900 |
|---|---|---|
| committer | Hirochika Matsumoto <git@hkmatsumoto.com> | 2021-09-29 00:22:32 +0900 |
| commit | cef736f8a05bab8d9a16f7120b5800670ef768ee (patch) | |
| tree | 054b5fbd108cdb2353ef0a5253de9b1e8b006b9c /src/test/ui/error-codes | |
| parent | 60fe8b3a65be709fe2163b8ab438ef14209055cc (diff) | |
| download | rust-cef736f8a05bab8d9a16f7120b5800670ef768ee.tar.gz rust-cef736f8a05bab8d9a16f7120b5800670ef768ee.zip | |
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.
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0407.stderr | 5 |
1 files changed, 4 insertions, 1 deletions
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 |
