Commit Graph

18 Commits

Author SHA1 Message Date
Michael Goulet 30f9e8da76 Make method-not-found-generic-arg-elision.rs error message not path dependent 2023-04-26 21:48:21 +00:00
Michael Goulet 5a3ba47a24 Do not use ImplDerivedObligationCause for inherent impl method error reporting 2023-04-10 06:06:08 +00:00
Christopher Acosta 0f0acfa4cf Error code E0794 for late-bound lifetime parameter error. 2023-03-07 21:26:19 +01:00
clubby789 0d8bf5f031 Highlight whole expression for E0599 2023-03-01 16:57:11 +00:00
Matthias Krüger 2a049a2241 Rollup merge of #108456 - clubby789:ast-passes-diag-migrate, r=compiler-errors
Complete migrating `ast_passes` to derive diagnostics

cc #100717

```@rustbot``` label +A-translation
2023-02-26 00:46:28 +01:00
clubby789 6bbbadb24d Complete migrating ast_passes to derive diagnostics 2023-02-25 15:19:13 +00:00
Michael Howell c9289896f0 diagnostics: remove inconsistent English article "this" from E0107
Consider `tests/ui/const-generics/generic_const_exprs/issue-102768.stderr`,
the error message where it gives additional notes about where the associated
type is defined, and how the dead code lint doesn't have an article,
like in `tests/ui/lint/dead-code/issue-85255.stderr`. They don't have
articles, so it seems unnecessary to have one here.
2023-02-23 10:27:06 -07:00
Michael Howell 399992d3b6 diagnostics: update test cases to refer to assoc fn with self as method 2023-02-22 08:40:47 -07:00
Matthias Krüger 6fb4c020c6 Rollup merge of #106347 - estebank:removal-suggestion, r=TaKO8Ki
More accurate spans for arg removal suggestion

Partially address #106304.
2023-02-16 17:51:24 +01:00
Nicholas Nethercote 92f115df2a Remove save-analysis.
Most tests involving save-analysis were removed, but I kept a few where
the `-Zsave-analysis` was an add-on to the main thing being tested,
rather than the main thing being tested.

For `x.py install`, the `rust-analysis` target has been removed.

For `x.py dist`, the `rust-analysis` target has been kept in a
degenerate form: it just produces a single file `reduced.json`
indicating that save-analysis has been removed. This is necessary for
rustup to keep working.

Closes #43606.
2023-02-16 15:14:45 +11:00
Esteban Küber a26a4256c0 Make removal suggestion not verbose 2023-02-14 20:22:10 +00:00
Esteban Küber 90f91b567c rebase and review comments 2023-02-14 20:22:10 +00:00
Esteban Küber eb7108bd60 More accurate spans for arg removal suggestion 2023-02-14 20:22:09 +00:00
Esteban Küber 5eb6468cef Modify primary span label for E0308
The previous output was unintuitive to users.
2023-01-30 20:12:19 +00:00
Robin Schroer 85e580a13c 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.
2023-01-23 10:07:10 +09:00
Esteban Küber 9eef34d5b4 Tweak output 2023-01-11 19:31:34 +00:00
Esteban Küber 66476f988b Conserve cause of ImplDerivedObligation in E0599
CC #86377.
2023-01-11 19:31:33 +00:00
Albert Larsan 8f6b5d4e26 Move /src/test to /tests 2023-01-11 09:32:08 +00:00