about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorRobin Schroer <git@sulami.xyz>2023-01-18 19:58:50 +0900
committerRobin Schroer <git@sulami.xyz>2023-01-23 10:07:10 +0900
commitf908f0be5a088a0e1748c7853a8acf75be6d1c18 (patch)
treed13ae9355ba15f7eda05b95da729cb0b02476bef /compiler/rustc_interface/src/errors.rs
parent51d50ea96ecc9c681a0054e5eb8e5e1d4ab38906 (diff)
downloadrust-f908f0be5a088a0e1748c7853a8acf75be6d1c18.tar.gz
rust-f908f0be5a088a0e1748c7853a8acf75be6d1c18.zip
Consider doc(alias) when providing typo suggestions
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.
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions