about summary refs log tree commit diff
path: root/tests/ui/nll
AgeCommit message (Collapse)AuthorLines
2023-12-14update use of feature flagslcnr-1/+1
2023-12-07recurse into refs when comparing tys for diagnosticsjyn-8/+8
2023-12-05Add print_trait_sugaredMichael Goulet-4/+4
2023-12-01add tests from crater for liveness causing scope differencesRémy Rakic-0/+46
2023-11-24Manual find replace updatesNilstrieb-1/+1
2023-11-24Show number in error message even for one errorNilstrieb-136/+136
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-14review + fix CIlcnr-1/+1
2023-11-14finish `RegionKind` renamelcnr-4/+4
- `ReFree` -> `ReLateParam` - `ReEarlyBound` -> `ReEarlyParam`
2023-11-13rename `ReLateBound` to `ReBound`lcnr-15/+15
other changes: - `Region::new_late_bound` -> `Region::new_bound` - `Region::is_late_bound` -> `Region::is_bound`
2023-11-04add test for issue 117146Rémy Rakic-0/+100
2023-10-24Auto merge of #116300 - cjgillot:split-move, r=petrochenkovbors-1/+1
Separate move path tracking between borrowck and drop elaboration. The primary goal of this PR is to skip creating a `MovePathIndex` for path that do not need dropping in drop elaboration. The 2 first commits are cleanups. The next 2 commits displace `move` errors from move-path builder to borrowck. Move-path builder keeps the same logic, but does not carry error information any more. The remaining commits allow to filter `MovePathIndex` creation according to types. This is used in drop elaboration, to avoid computing dataflow for paths that do not need dropping.
2023-10-23Rollup merge of #116960 - lqd:applied-member-constraints-scope, r=matthewjasperMatthias Krüger-0/+105
Location-insensitive polonius: consider a loan escaping if an SCC has member constraints applied only The location-insensitive analysis considered loans to escape if there were member constraints, which makes *some* sense for scopes and matches the scopes that NLL computes on all the tests. However, polonius and NLLs differ on the fuzzed case #116657, where an SCC has member constraints but no applied ones (and is kinda surprising). The existing UI tests with member constraints impacting scopes all have some constraint applied. This PR changes the location-insensitive analysis to consider a loan to escape if there are applied member constraints, and for extra paranoia/insurance via fuzzing and crater: actually checks the constraint's min choice is indeed a universal region as we expect. (This could be turned into a `debug_assert` and early return as a slight optimization after these periods of verification) The 4 UI tests where member constraints are meaningful for computing scopes still pass obviously, and this also fixes #116657. r? `@matthewjasper`
2023-10-21Do not report errors from move path builder.Camille GILLOT-1/+1
2023-10-20Rename lots of files that had `generator` in their nameOli Scherer-2/+2
2023-10-20s/generator/coroutine/Oli Scherer-14/+14
2023-10-20s/Generator/Coroutine/Oli Scherer-3/+3
2023-10-19add non-regression test for issue 116657Rémy Rakic-0/+105
2023-10-08remove trailing dotsAli MJ Al-Nasrawy-31/+31
2023-10-08always show and explain sub regionAli MJ Al-Nasrawy-17/+114
2023-10-08improve the suggestion of generic_bound_failureAli MJ Al-Nasrawy-12/+20
2023-10-05Add a note to duplicate diagnosticsAlex Macleod-0/+13
2023-09-24Remove span from BrAnon.Camille GILLOT-15/+15
2023-09-21adjust how closure/generator types and rvalues are printedRalf Jung-1/+1
2023-08-30add test for issue 114907Rémy Rakic-0/+119
2023-08-06Remove FIXME about NLL diagnostic that is already improvedMartin Nordholts-3/+1
The FIXME was added in 46984 when the diagnostic message looked like this: // FIXME(#46983): error message should be better &s.0 //~ ERROR free region `` does not outlive free region `'static` The message was improved in 90667 and now looks like this: &s.0 //~ ERROR lifetime may not live long enough but the FIXME was not removed. The issue 46983 about that diagnostics should be improved has been closed. We can remove the FIXME now.
2023-07-29Change default panic handler message format.Mara Bos-1/+2
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-57/+57
2023-07-10Do not set up wrong span for adjustmentsMichael Goulet-43/+43
2023-06-30resolve typerelative ctors to adtEric Mark Martin-1/+1
2023-06-21Print def_id on EarlyBoundRegion debugSantiago Pastorino-2/+2
2023-06-15Rollup merge of #112654 - aliemjay:closure-output-normalize, r=compiler-errorsGuillaume Gomez-0/+49
normalize closure output in equate_inputs_and_outputs Fixes #112604
2023-06-15normalize closure output before relationAli MJ Al-Nasrawy-0/+49
2023-06-12Adjust UI tests for `unit_bindings`许杰友 Jieyou Xu (Joe)-3/+3
- Either explicitly annotate `let x: () = expr;` where `x` has unit type, or remove the unit binding to leave only `expr;` instead. - Fix disjoint-capture-in-same-closure test
2023-06-05Resolve vars in result from scrape_region_constraintsMichael Goulet-0/+2
2023-05-21Rename `drop_ref` lint to `dropping_references`Urgau-1/+1
2023-05-21Rename `drop_copy` lint to `dropping_copy_types`Urgau-1/+1
2023-05-12Auto merge of #109732 - Urgau:uplift_drop_forget_ref_lints, r=davidtwcobors-0/+4
Uplift `clippy::{drop,forget}_{ref,copy}` lints This PR aims at uplifting the `clippy::drop_ref`, `clippy::drop_copy`, `clippy::forget_ref` and `clippy::forget_copy` lints. Those lints are/were declared in the correctness category of clippy because they lint on useless and most probably is not what the developer wanted. ## `drop_ref` and `forget_ref` The `drop_ref` and `forget_ref` lint checks for calls to `std::mem::drop` or `std::mem::forget` with a reference instead of an owned value. ### Example ```rust let mut lock_guard = mutex.lock(); std::mem::drop(&lock_guard) // Should have been drop(lock_guard), mutex // still locked operation_that_requires_mutex_to_be_unlocked(); ``` ### Explanation Calling `drop` or `forget` on a reference will only drop the reference itself, which is a no-op. It will not call the `drop` or `forget` method on the underlying referenced value, which is likely what was intended. ## `drop_copy` and `forget_copy` The `drop_copy` and `forget_copy` lint checks for calls to `std::mem::forget` or `std::mem::drop` with a value that derives the Copy trait. ### Example ```rust let x: i32 = 42; // i32 implements Copy std::mem::forget(x) // A copy of x is passed to the function, leaving the // original unaffected ``` ### Explanation Calling `std::mem::forget` [does nothing for types that implement Copy](https://doc.rust-lang.org/std/mem/fn.drop.html) since the value will be copied and moved into the function on invocation. ----- Followed the instructions for uplift a clippy describe here: https://github.com/rust-lang/rust/pull/99696#pullrequestreview-1134072751 cc `@m-ou-se` (as T-libs-api leader because the uplifting was discussed in a recent meeting)
2023-05-10Adjust tests for new drop and forget lintsUrgau-0/+4
2023-05-09Rollup merge of #111021 - c410-f3r:dqewdas, r=petrochenkovMatthias Krüger-0/+253
Move some tests r? ``@petrochenkov``
2023-05-08Move testsCaio-0/+253
2023-05-05tweak spans for `ref mut` suggestionEzra Shaw-1/+1
2023-05-05tweak "make mut" spans (No. 3)Ezra Shaw-1/+1
2023-05-05tweak "make mut" spans when assigning to localsEzra Shaw-1/+1
2023-04-25vars are ?Michael Goulet-199/+199
2023-04-19Extend and use `hir::Node::body_id`Maybe Waffle-8/+30
2023-04-12Split out a separate feature gate for impl trait in associated typesOli Scherer-1/+1
2023-04-06Remove index from BrAnonJack Huey-15/+15
2023-04-05Fix a debuginfo test with a hard-coded hashThom Chiovoloni-1/+1
2023-04-05Bless testsThom Chiovoloni-3/+3
2023-03-31allow ReError in CanonicalUserTypeAnnotationAli MJ Al-Nasrawy-0/+40