about summary refs log tree commit diff
path: root/tests/ui/nll
AgeCommit message (Collapse)AuthorLines
2025-07-16trait_sel: `MetaSized` always holds temporarilyDavid Wood-18/+2
As a temporary measure while a proper fix for `tests/ui/sized-hierarchy/incomplete-inference-issue-143992.rs` is implemented, make `MetaSized` obligations always hold. In effect, temporarily reverting the `sized_hierarchy` feature. This is a small change that can be backported.
2025-07-04Remove Symbol for Named LateParam/Bound variantsMichael Goulet-4/+4
2025-06-24Make missing lifetime suggestion verboseMichael Goulet-3/+6
2025-06-16trait_sel: skip elaboration of sizedness supertraitDavid Wood-1/+1
As a performance optimization, skip elaborating the supertraits of `Sized`, and if a `MetaSized` obligation is being checked, then look for a `Sized` predicate in the parameter environment. This makes the `ParamEnv` smaller which should improve compiler performance as it avoids all the iteration over the larger `ParamEnv`.
2025-06-16tests: bless remaining testsDavid Wood-4/+19
These tests just need blessing, they don't have any interesting behaviour changes. Some of these tests have new errors because `LegacyReceiver` cannot be proven to be implemented now that it is also testing for `MetaSized` - but this is just a consequence of the other errors in the test.
2025-06-12Rollup merge of #141069 - chenyukang:yukang-fix-137486-suggest-mut, r=davidtwcoMatthias Krüger-0/+81
Suggest mut when possbile for temporary value dropped while borrowed Fixes #137486
2025-06-04Replace `elided_named_lifetimes` with `mismatched_lifetime_syntaxes`Jake Goulding-2/+2
2025-05-29Normalize possibly unnormalized type in relate_type_and_user_typeMichael Goulet-0/+31
2025-05-27Suggest mut when possbile for temporary value dropped while borrowedyukang-0/+81
2025-05-24Avoid extra path trimming in method not found errorNoratrieb-3/+3
Method errors have an extra check that force trim paths whenever the normal string is longer than 10 characters, which can be quite unhelpful when multiple items have the same name (for example an `Error`). A user reported this force trimming as being quite unhelpful when they had a method error where the precise path of the `Error` mattered. The code uses `tcx.short_string` already to get the normal path, which tries to be clever around trimming paths if necessary, so there is no reason for this extra force trimming.
2025-05-02borrowck nested items in dead codelcnr-0/+78
2025-04-26Fix error message for static references or mutable referencesyuk1ty-2/+2
2025-04-22Auto merge of #139960 - amandasystems:placeholder-ui-tests, r=lcnrbors-0/+56
Add tests for two untested cases of placeholder relations During work on #130227, I discovered several situations not covered by any previously existing UI test. This commit introudces tests to cover that. r? lcnr
2025-04-22Add tests for two untested cases of placeholder relationsAmanda Stjerna-0/+56
During work on #130227, I discovered several situations not covered by any previously existing UI test. This commit introudces tests to cover that.
2025-04-08UI tests: add missing diagnostic kinds where possibleVadim Petrochenkov-7/+7
2025-04-04Fix `Debug` impl for `LateParamRegionKind`.Nicholas Nethercote-4/+4
It uses `Br` prefixes which are inappropriate and appear to have been incorrectly copy/pasted from the `Debug` impl for `BoundRegionKind`.
2025-03-06`TypeVerifier` do not walk into required constslcnr-12/+1
2025-02-21More sophisticated span trimmingMichael Goulet-3/+2
2025-02-19Rollup merge of #137059 - xizheyin:issue-136827, r=davidtwcoMatthias Krüger-2/+2
fix: Alloc new errorcode E0803 for E0495 As discussion in #136827, I alloc a new errorcode.
2025-02-15fix: Alloc new errorcode E0803 for E0495xizheyin-2/+2
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-02-14Trim suggestion parts to the subset that is purely additiveMichael Goulet-8/+8
2025-02-14Use underline suggestions for purely 'additive' replacementsMichael Goulet-24/+16
2025-02-13Improved named region errorsMichael Goulet-17/+33
2025-02-11Deeply normalize signature in new solverMichael Goulet-3/+54
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-10/+15
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
2025-01-31update NLL `get_default` test for poloniusesRémy Rakic-12/+51
- it still mentions AST borrowck - it tracks errors that shouldn't exist and are fixed by polonius
2025-01-31add explicit revisions to polonius testsRémy Rakic-14/+148
The blessed expectations were recently removed because they were only checked via the compare-mode. This switches to explicit revisions to ensure it doesn't happen again. - `assignment-to-differing-field` - `polonius-smoke-test` - `subset-relations`
2025-01-31add explicit revisions to check-pass testsRémy Rakic-5/+16
2025-01-31merge duplicate issue-46589 testsRémy Rakic-38/+8
also add explicit revisions for -Zpolonius=next
2025-01-27Remove all dead files inside tests/ui/León Orell Valerian Liehr-203/+0
2025-01-23tests: use `needs-subprocess` instead of `ignore-{wasm32,emscripten,sgx}`许杰友 Jieyou Xu (Joe)-1/+1
2025-01-14mir borrowck: cleanup late-bound region handlinglcnr-6/+6
2025-01-06only avoid blaming assignments from argument patternsdianne-24/+14
2025-01-06make outlives constraints from pointer comparisons less boringdianne-15/+15
2025-01-06`best_blame_constraint`: prioritize blaming interesting-seeming constraintsdianne-53/+65
2025-01-06`best_blame_constraint`: avoid blaming assignments without user-provided typesdianne-14/+24
2025-01-06`best_blame_constraint`: add a special case to recover object lifetime ↵dianne-11/+5
default notes
2025-01-06`best_blame_constraint`: don't filter constraints by sup SCCdianne-222/+245
The SCCs of the region graph are not a reliable heuristic to use for blaming an interesting constraint for diagnostics. For region errors, if the outlived region is `'static`, or the involved types are invariant in their lifetiems, there will be cycles in the constraint graph containing both the target region and the most interesting constraints to blame. To get better diagnostics in these cases, this commit removes that heuristic.
2024-12-31Rollup merge of #133486 - dianne:fix-move-error-suggestion, r=estebankTrevor Gross-3/+4
borrowck diagnostics: make `add_move_error_suggestions` use the HIR rather than `SourceMap` This PR aims to fix #132806 by rewriting `add_move_error_suggestions`[^1]. Previously, it manually scanned the source text to find a leading `&`, which isn't always going to produce a correct result (see: that issue). Admittedly, the HIR visitor in this PR introduces a lot of boilerplate, but hopefully the logic at its core isn't too complicated (I go over it in the comments). I also tried a simpler version that didn't use a HIR visitor and suggested adding `ref` always, but the `&ref x` suggestions really didn't look good. As a bonus for the added complexity though, it's now able to produce nice `&`-removing suggestions in more cases. I tried to do this such that it avoids edition-dependent checks and its suggestions can be applied together with those from the match ergonomics 2024 migration lint. I haven't added tests for that since the details of match ergonomics 2024 are still being sorted out, but I can try if desired once that's finalized. [^1]: In brief, it fires on patterns where users try to bind by-value in such a way that moves out of a reference to a non-Copy type (including slice references with non-copy elements). The suggestions are to change the binding's mode to be by-reference, either by removing[^2] an enclosing `&`/`&mut` or adding `ref` to the binding. [^2]: Incidentally, I find the terminology of "consider removing the borrow" a bit confusing for a suggestion to remove a `&` pattern in order to make bindings borrow rather than move. I'm not sure what a good, concise way to explain that would be though, and that should go in a separate PR anyway.
2024-12-12Tweak multispan renderingEsteban Küber-12/+3
Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in `*.stderr` tests that have "hidden" comments.
2024-12-03closure-requirements: add regression testslcnr-3/+62
2024-11-28Update more 2024 tests to remove -Zunstable-optionsEric Huss-2/+1
2024-11-25`add_move_error_suggestions`: use a HIR visitor rather than `SourceMap`dianne-3/+4
2024-11-21Stop being so bail-y in candidate assemblyMichael Goulet-10/+2
2024-10-24stabilize if_let_rescopeDing Xiang Fei-3/+1
2024-09-24replace "cast" with "coercion" where applicableLukas Markeffsky-1/+1
This changes the remaining span for the cast, because the new `Cast` category has a higher priority (lower `Ord`) than the old `Coercion` category, so we no longer report the region error for the "unsizing" coercion from `*const Trait` to itself.
2024-09-24use more accurate spans for user type ascriptionsLukas Markeffsky-6/+4
2024-09-13Update tests for hidden references to mutable staticObei Sideg-8/+10
2024-09-11rescope temp lifetime in let-chain into IfElseDing Xiang Fei-2/+19
apply rules by span edition
2024-08-31Create opaque definitions in resolver.Camille GILLOT-4/+4