f908f0be5a
This means that ```rust impl Foo { #[doc(alias = "quux")] fn bar(&self) {} } fn main() { (Foo {}).quux(); } ``` will suggest `bar`. This currently uses the "there is a method with a similar name" help text, because the point where we choose and emit a suggestion is different from where we gather the suggestions. Changes have mainly been made to the latter. The selection code will now fall back to aliased candidates, but generally only if there is no candidate that matches based on the existing Levenshtein methodology. Fixes #83968.
13 lines
410 B
Plaintext
13 lines
410 B
Plaintext
error[E0599]: no method named `quux` found for struct `Foo` in the current scope
|
|
--> $DIR/method-not-found-but-doc-alias.rs:9:9
|
|
|
|
|
LL | struct Foo;
|
|
| ---------- method `quux` not found for this struct
|
|
...
|
|
LL | Foo.quux();
|
|
| ^^^^ help: there is a method with a similar name: `bar`
|
|
|
|
error: aborting due to previous error
|
|
|
|
For more information about this error, try `rustc --explain E0599`.
|