about summary refs log tree commit diff
path: root/tests/ui/nll/user-annotations
AgeCommit message (Collapse)AuthorLines
2025-09-30Split Bound into Canonical and Boundjackh726-4/+4
2025-06-24Make missing lifetime suggestion verboseMichael Goulet-3/+6
2025-05-29Normalize possibly unnormalized type in relate_type_and_user_typeMichael Goulet-0/+31
2025-01-27Remove all dead files inside tests/ui/León Orell Valerian Liehr-61/+0
2025-01-06only avoid blaming assignments from argument patternsdianne-24/+14
2025-01-06`best_blame_constraint`: avoid blaming assignments without user-provided typesdianne-14/+24
2025-01-06`best_blame_constraint`: don't filter constraints by sup SCCdianne-58/+47
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-11-21Stop being so bail-y in candidate assemblyMichael Goulet-10/+2
2024-09-24use more accurate spans for user type ascriptionsLukas Markeffsky-6/+4
2024-04-24Modify `find_expr` from `Span` to better account for closuresEsteban Küber-2/+6
Start pointing to where bindings were declared when they are captured in closures: ``` error[E0597]: `x` does not live long enough --> $DIR/suggest-return-closure.rs:23:9 | LL | let x = String::new(); | - binding `x` declared here ... LL | |c| { | --- value captured here LL | x.push(c); | ^ borrowed value does not live long enough ... LL | } | -- borrow later used here | | | `x` dropped here while still borrowed ``` Suggest cloning in more cases involving closures: ``` error[E0507]: cannot move out of `foo` in pattern guard --> $DIR/issue-27282-move-ref-mut-into-guard.rs:11:19 | LL | if { (|| { let mut bar = foo; bar.take() })(); false } => {}, | ^^ --- move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait | | | `foo` is moved here | = note: variables bound in patterns cannot be moved from until after the end of the pattern guard help: consider cloning the value if the performance cost is acceptable | LL | if { (|| { let mut bar = foo.clone(); bar.take() })(); false } => {}, | ++++++++ ```
2024-03-21Stop `ConstraintCategory` `Ord` impl from relying on `Ty`'s `Ord` impl.Oli Scherer-10/+11
2024-03-20make `type_flags(ReError) & HAS_ERROR`Ali MJ Al-Nasrawy-2/+10
2024-03-18update region debug formattingBoxy-16/+17
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-14/+14
2023-12-19rename to verbose-internalsjyn-2/+2
2023-11-24Show number in error message even for one errorNilstrieb-14/+14
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-08remove trailing dotsAli MJ Al-Nasrawy-7/+7
2023-10-08always show and explain sub regionAli MJ Al-Nasrawy-7/+28
2023-10-05Add a note to duplicate diagnosticsAlex Macleod-0/+2
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-7/+7
2023-06-30resolve typerelative ctors to adtEric Mark Martin-1/+1
2023-04-19Extend and use `hir::Node::body_id`Maybe Waffle-8/+30
2023-03-31allow ReError in CanonicalUserTypeAnnotationAli MJ Al-Nasrawy-0/+40
2023-01-15Tweak E0597Esteban Küber-3/+112
CC #99430
2023-01-11Move /src/test to /testsAlbert Larsan-0/+3533