-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NLL: Review compile-fail migrated tests #53351
Comments
aassociated-types-subtyping-1.rs might be test weakness (in the sense of #51025), or an artifact of #47184, or both. In particular, I'm a little nervous about some of the code that is trying to encode some constraint also being clearly unreachable (due to |
I finished going through the remainder of the list. I have distributed the entries into the following buckets: Glaring test weakness (in the sense of #51025); DONE: see PR #53369For these, the test presumes lexical lifetimes (e.g. it writes
rust/src/test/ui/mut/mut-cant-alias.rs Line 18 in a573305
Possible test weakness #51025 (e.g., do we need to add some calls of the closures or object methods, or make code reachable?); (almost done, see PR #53407)Update: adding calls is not needed; it suffices to merely add (no-op) references to the variables that hold the first closure immediately after the second one is defined, and you see the error then. Update 2: I've covered all the cases except associated-types-subtyping-1.rs in PR #53407
rust/src/test/ui/hashmap-lifetimes.rs Line 17 in a573305
Fixed (at least somewhat) by NLLFor these cases, we should just add a rust/src/test/ui/borrowck/borrowck-lend-flow-if.rs Lines 31 to 41 in a573305
rust/src/test/ui/borrowck/borrowck-lend-flow.rs Lines 31 to 37 in a573305
Have our rvalue lifetime rules changed...?
I skimmed over this test but I cannot immediately tell whether NLL should have changed anything here... I'll need to read it again with a fresh pair of eyes (and perhaps review some of the doc and/or blog posts discussing our rvalue lifetime rules...) rust/src/test/ui/cleanup-rvalue-scopes-cf.rs Lines 37 to 45 in a573305
Known bugThese cases all fall into some form of #47184 I link to the first obvious example of some type ascription that is currently unchecked:
rust/src/test/ui/closure_promotion.rs Line 18 in a573305
rust/src/test/ui/issues/issue-28848.rs Line 22 in a573305
Finally, all of the tests in I think all of these should be fixed when #47184 is fixed, or potentially sooner as subtasks of that bug are completed. Already using -Z borrowck=XXX in a different revision.In this case, the test is already requesting some form of MIR-borrowck via explicit compiler flags and presumably does not need to go through the rust/src/test/ui/issues/issue-5500-1.rs Line 13 in a573305
|
… from rust-lang#53196. See also the bulletpoint list on rust-lang#53351.
There isn't that much left to do here in the short term; IMO all of the regions/ and variance/ are effectively blocked on #47184 -- or at least, I do not think we should invest any effort trying to find a different way to encode those tests. All such effort should be spent instead on addressing #47184, and then once that is addressed, we should be able to remove the I think once you remove those files and the others blocked by #47184, then there's only maybe nine or tests left to be either investigated or updated. |
(having said that, I'm unassigning myself since I am not sure I will have time during the remainder of this week to investigate the remaining tests here.) |
assigning to self so that remember to factor this into smaller issues that can be individually triaged. |
As part of #53196,
compile-fail
tests were migrated toui
tests. In doing this, a handful of tests compile successfully in the NLL compare mode, but not in the normal AST compare mode. These tests were marked as "ignore on NLL compare mode" as there isn't an easy way to assert that a test compiles successfully in one compare mode and not in another. These tests are listed below and should be checked to make sure that it is correct that these tests ran successfully in NLL compare mode or if they have a bug:(exact locations of tests have changed)
borrowck/
rust/src/test/ui/borrowck/borrow-tuple-fields.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-closures-two-mut-fail.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-closures-two-mut-fail.rs
Line 17 in a573305
borrowck=compare
, (a mode which I think we really should retire at this point...)rust/src/test/ui/borrowck/borrowck-closures-two-mut.rs
Line 15 in a573305
rust/src/test/ui/borrowck/borrowck-closures-unique-imm.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-closures-unique.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-issue-2657-1.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-lend-flow-if.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-lend-flow.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-loan-blocks-move-cc.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-loan-blocks-move.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-move-mut-base-ptr.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-object-lifetime.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-union-borrow-nested.rs
Line 11 in a573305
rust/src/test/ui/borrowck/borrowck-uniq-via-lend.rs
Line 11 in a573305
regions/
rust/src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-bounded-by-trait-requiring-static.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-bounded-method-type-parameters.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-free-region-ordering-caller.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-implied-bounds-projection-gap-1.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-infer-contravariance-due-to-decl.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-infer-covariance-due-to-decl.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-outlives-projection-container-wc.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-outlives-projection-container.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-variance-contravariant-use-covariant.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-variance-covariant-use-contravariant.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-variance-invariant-use-contravariant.rs
Line 11 in a573305
rust/src/test/ui/regions/regions-variance-invariant-use-covariant.rs
Line 11 in a573305
variance/
rust/src/test/ui/variance/variance-cell-is-invariant.rs
Line 11 in a573305
rust/src/test/ui/variance/variance-contravariant-arg-trait-match.rs
Line 11 in a573305
rust/src/test/ui/variance/variance-contravariant-self-trait-match.rs
Line 11 in a573305
rust/src/test/ui/variance/variance-covariant-arg-trait-match.rs
Line 11 in a573305
rust/src/test/ui/variance/variance-covariant-self-trait-match.rs
Line 11 in a573305
rust/src/test/ui/variance/variance-invariant-arg-trait-match.rs
Line 11 in a573305
rust/src/test/ui/variance/variance-invariant-self-trait-match.rs
Line 11 in a573305
other
rust/src/test/ui/associated-types/associated-types-subtyping-1.rs
Line 11 in a573305
rust/src/test/ui/cleanup-rvalue-scopes-cf.rs
Line 11 in a573305
rust/src/test/ui/closure_promotion.rs
Line 11 in a573305
rust/src/test/ui/hashmap-lifetimes.rs
Line 11 in a573305
rust/src/test/ui/issues/issue-28848.rs
Line 11 in a573305
rust/src/test/ui/issues/issue-5500-1.rs
Line 11 in a573305
rust/src/test/ui/methods/method-self-arg-2.rs
Line 11 in a573305
rust/src/test/ui/mut/mut-cant-alias.rs
Line 11 in a573305
rust/src/test/ui/unboxed-closures/unboxed-closure-region.rs
Line 11 in a573305
rust/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.rs
Line 11 in a573305
The text was updated successfully, but these errors were encountered: