about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2023-01-23 11:52:05 +0530
committerGitHub <noreply@github.com>2023-01-23 11:52:05 +0530
commitf4f3335114e5e2588707f5fedf3bd290e18e4732 (patch)
treee494a53e4473a8f52357322d01ad532e7c17367f /compiler/rustc_interface/src/errors.rs
parent28081a6aa6a13199e6ee3c09ab544139eb23a3fa (diff)
parentf908f0be5a088a0e1748c7853a8acf75be6d1c18 (diff)
downloadrust-f4f3335114e5e2588707f5fedf3bd290e18e4732.tar.gz
rust-f4f3335114e5e2588707f5fedf3bd290e18e4732.zip
Rollup merge of #107108 - sulami:issue-83968-doc-alias-typo-suggestions, r=compiler-errors
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