about summary refs log tree commit diff
path: root/tests/ui/methods
AgeCommit message (Collapse)AuthorLines
2023-11-24Show number in error message even for one errorNilstrieb-15/+15
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-12Don't expect a rcvr in print_disambiguation_helpMichael Goulet-0/+46
2023-11-07Rework print_disambiguation_helpMichael Goulet-36/+36
2023-10-17Unify suggestion wordingEsteban Küber-74/+45
2023-10-17review comments + more testsEsteban Küber-12/+412
2023-10-17Properly account for self ty in method disambiguation suggestionEsteban Küber-0/+109
Fix #116703.
2023-10-04Reorder fullfillment errors to keep more interesting ones firstEsteban Küber-1/+1
In `report_fullfillment_errors` push back `T: Sized`, `T: WellFormed` and coercion errors to the end of the list. The pre-existing deduplication logic eliminates redundant errors better that way, keeping the resulting output with fewer errors than before, while also having more detail.
2023-09-21adjust how closure/generator types and rvalues are printedRalf Jung-1/+1
2023-08-28Move testsCaio-0/+37
2023-08-26More accurately point at argumentsEsteban Küber-2/+2
2023-07-27Adjust spans correctly for fn -> method suggestionMichael Goulet-0/+21
2023-07-25write-long-types-to-disk: update testsMahdi Dibaiee-7/+5
2023-07-24new unstable option: -Zwrite-long-types-to-diskMahdi Dibaiee-4/+5
This option guards the logic of writing long type names in files and instead using short forms in error messages in rustc_middle/ty/error behind a flag. The main motivation for this change is to disable this behaviour when running ui tests. This logic can be triggered by running tests in a directory that has a long enough path, e.g. /my/very-long-path/where/rust-codebase/exists/ This means ui tests can fail depending on how long the path to their file is. Some ui tests actually rely on this behaviour for their assertions, so for those we enable the flag manually.
2023-07-10Do not set up wrong span for adjustmentsMichael Goulet-2/+2
2023-05-26improve error message for calling a method on a raw pointer with an unknown ↵asquared31415-0/+55
pointee, and add some tests
2023-05-08Tweak borrow suggestionMichael Goulet-4/+6
2023-04-26Make method-not-found-generic-arg-elision.rs error message not path dependentMichael Goulet-5/+5
2023-04-10Do not use ImplDerivedObligationCause for inherent impl method error reportingMichael Goulet-0/+87
2023-03-07Error code E0794 for late-bound lifetime parameter error.Christopher Acosta-17/+19
2023-03-01Highlight whole expression for E0599clubby789-7/+10
2023-02-26Rollup merge of #108456 - clubby789:ast-passes-diag-migrate, r=compiler-errorsMatthias Krüger-1/+1
Complete migrating `ast_passes` to derive diagnostics cc #100717 ```@rustbot``` label +A-translation
2023-02-25Complete migrating `ast_passes` to derive diagnosticsclubby789-1/+1
2023-02-23diagnostics: remove inconsistent English article "this" from E0107Michael Howell-8/+8
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-22diagnostics: update test cases to refer to assoc fn with `self` as methodMichael Howell-30/+30
2023-02-16Rollup merge of #106347 - estebank:removal-suggestion, r=TaKO8KiMatthias Krüger-5/+4
More accurate spans for arg removal suggestion Partially address #106304.
2023-02-16Remove save-analysis.Nicholas Nethercote-4/+3
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-14Make removal suggestion not verboseEsteban Küber-6/+4
2023-02-14rebase and review commentsEsteban Küber-1/+1
2023-02-14More accurate spans for arg removal suggestionEsteban Küber-2/+3
2023-01-30Modify primary span label for E0308Esteban Küber-10/+10
The previous output was unintuitive to users.
2023-01-23Consider doc(alias) when providing typo suggestionsRobin Schroer-0/+23
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-11Tweak outputEsteban Küber-10/+6
2023-01-11Conserve cause of `ImplDerivedObligation` in E0599Esteban Küber-3/+14
CC #86377.
2023-01-11Move /src/test to /testsAlbert Larsan-0/+3405