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/hygiene | |
| parent | 60fe8b3a65be709fe2163b8ab438ef14209055cc (diff) | |
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/hygiene')
| -rw-r--r-- | src/test/ui/hygiene/assoc_item_ctxt.stderr | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/ui/hygiene/assoc_item_ctxt.stderr b/src/test/ui/hygiene/assoc_item_ctxt.stderr index 6e4fecf0ce4..517b1ff5988 100644 --- a/src/test/ui/hygiene/assoc_item_ctxt.stderr +++ b/src/test/ui/hygiene/assoc_item_ctxt.stderr @@ -2,7 +2,10 @@ error[E0407]: method `method` is not a member of trait `Tr` --> $DIR/assoc_item_ctxt.rs:35:13 | LL | fn method() {} - | ^^^^^^^^^^^^^^ not a member of trait `Tr` + | ^^^------^^^^^ + | | | + | | help: there is an associated function with a similar name: `method` + | not a member of trait `Tr` ... LL | mac_trait_impl!(); | ------------------ in this macro invocation |
