Commit Graph

20 Commits

Author SHA1 Message Date
asquared31415
b19466abc2 improve error message for calling a method on a raw pointer with an unknown pointee, and add some tests 2023-05-26 13:15:15 -04:00
Michael Goulet
a9051d861c Tweak borrow suggestion 2023-05-08 03:36:30 +00:00
Michael Goulet
0fabceb2df Make method-not-found-generic-arg-elision.rs error message not path dependent 2023-04-26 21:48:21 +00:00
Michael Goulet
b369c8ecbd Do not use ImplDerivedObligationCause for inherent impl method error reporting 2023-04-10 06:06:08 +00:00
Christopher Acosta
75563cd725 Error code E0794 for late-bound lifetime parameter error. 2023-03-07 21:26:19 +01:00
clubby789
6c2a952b56 Highlight whole expression for E0599 2023-03-01 16:57:11 +00:00
Matthias Krüger
767c865f07
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
885f9e72d7 Complete migrating ast_passes to derive diagnostics 2023-02-25 15:19:13 +00:00
Michael Howell
a5b639dc01 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
3f374128ee diagnostics: update test cases to refer to assoc fn with self as method 2023-02-22 08:40:47 -07:00
Matthias Krüger
f65c6e416c
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
22a5125a36 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
bd176ee591 Make removal suggestion not verbose 2023-02-14 20:22:10 +00:00
Esteban Küber
5d63e10318 rebase and review comments 2023-02-14 20:22:10 +00:00
Esteban Küber
f02d8ec15e More accurate spans for arg removal suggestion 2023-02-14 20:22:09 +00:00
Esteban Küber
62ba3e70a1 Modify primary span label for E0308
The previous output was unintuitive to users.
2023-01-30 20:12:19 +00:00
Robin Schroer
f908f0be5a
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
317adda649 Tweak output 2023-01-11 19:31:34 +00:00
Esteban Küber
fb5d215347 Conserve cause of ImplDerivedObligation in E0599
CC #86377.
2023-01-11 19:31:33 +00:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00