mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
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.
12 lines
188 B
Rust
12 lines
188 B
Rust
struct Foo;
|
|
|
|
impl Foo {
|
|
#[doc(alias = "quux")]
|
|
fn bar(&self) {}
|
|
}
|
|
|
|
fn main() {
|
|
Foo.quux();
|
|
//~^ ERROR no method named `quux` found for struct `Foo` in the current scope
|
|
}
|