Is there anything blocking this happening? I should catch up with the conversation in
T-compiler about this.
I could take a look at that today if nobody else is doing it already.
afaik nobody is doing anything
@nikomatsakis https://github.com/rust-lang/rust/issues/52531 might be problematic?
we should fix that I guess
would you like to know how to fix it? :)
Yeah, that would be helpful. I've spotted this in the ui test code.
let's move to another topic..
I was already in the process of doing that.
oh... just did :)
I guess this still works, since your topic is more specific to the
@nikomatsakis These tests fail to compile in normal compare-mode but compile in nll compare-mode - I'm not sure if that is necessarily correct or not, should I just add
[ui (nll)] ui/compile-fail-migration/associated-types-subtyping-1.rs [ui (nll)] ui/compile-fail-migration/borrow-tuple-fields.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-borrow-mut-object-twice.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-closures-two-mut.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-closures-unique-imm.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-closures-unique.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-issue-2657-1.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-lend-flow-if.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-lend-flow.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-loan-blocks-move-cc.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-loan-blocks-move.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-move-from-subpath-of-borrowed-path.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-move-mut-base-ptr.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-mut-borrow-of-mut-base-ptr.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-object-lifetime.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-overloaded-index-autoderef.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-swap-mut-base-ptr.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-union-borrow-nested.rs [ui (nll)] ui/compile-fail-migration/borrowck/borrowck-uniq-via-lend.rs [ui (nll)] ui/compile-fail-migration/cleanup-rvalue-scopes-cf.rs [ui (nll)] ui/compile-fail-migration/closure_promotion.rs [ui (nll)] ui/compile-fail-migration/hashmap-lifetimes.rs [ui (nll)] ui/compile-fail-migration/issue-28848.rs [ui (nll)] ui/compile-fail-migration/issue-5500-1.rs#ast [ui (nll)] ui/compile-fail-migration/method-self-arg-2.rs [ui (nll)] ui/compile-fail-migration/mut-cant-alias.rs [ui (nll)] ui/compile-fail-migration/regions-assoc-type-in-supertrait-outlives-container.rs [ui (nll)] ui/compile-fail-migration/regions-bounded-by-trait-requiring-static.rs [ui (nll)] ui/compile-fail-migration/regions-bounded-method-type-parameters.rs [ui (nll)] ui/compile-fail-migration/regions-free-region-ordering-caller.rs [ui (nll)] ui/compile-fail-migration/regions-implied-bounds-projection-gap-1.rs [ui (nll)] ui/compile-fail-migration/regions-infer-contravariance-due-to-decl.rs [ui (nll)] ui/compile-fail-migration/regions-infer-covariance-due-to-decl.rs [ui (nll)] ui/compile-fail-migration/regions-outlives-projection-container-wc.rs [ui (nll)] ui/compile-fail-migration/regions-outlives-projection-container.rs [ui (nll)] ui/compile-fail-migration/regions-variance-contravariant-use-covariant-in-second-position.rs [ui (nll)] ui/compile-fail-migration/regions-variance-contravariant-use-covariant.rs [ui (nll)] ui/compile-fail-migration/regions-variance-covariant-use-contravariant.rs [ui (nll)] ui/compile-fail-migration/regions-variance-invariant-use-contravariant.rs [ui (nll)] ui/compile-fail-migration/regions-variance-invariant-use-covariant.rs [ui (nll)] ui/compile-fail-migration/unboxed-closure-region.rs [ui (nll)] ui/compile-fail-migration/unboxed-closures-borrow-conflict.rs [ui (nll)] ui/compile-fail-migration/variance-cell-is-invariant.rs [ui (nll)] ui/compile-fail-migration/variance-contravariant-arg-trait-match.rs [ui (nll)] ui/compile-fail-migration/variance-contravariant-self-trait-match.rs [ui (nll)] ui/compile-fail-migration/variance-covariant-arg-trait-match.rs [ui (nll)] ui/compile-fail-migration/variance-covariant-self-trait-match.rs [ui (nll)] ui/compile-fail-migration/variance-invariant-arg-trait-match.rs [ui (nll)] ui/compile-fail-migration/variance-invariant-self-trait-match.rs
After that, all the compile-fail tests will be working as UI tests. (Then I'll look into moving them into the main
src/test/ui folder rather than
src/test/ui/compile-fail-migration and organizing them slightly as per #46841).
I should clarify, they pass in normal compare-mode, but they fail in NLL compare-mode because they compile successfully.
There are some (like
issue-550-1.rs#ast) that I can see are fine but others where I'm not sure if it is a NLL bug that they compile or if it is NLL being great.
@davidtwco I think in such cases we did ignore the compare mode, yes -- or maybe we added
#[cfg_attr(nll, rustc_error)] to the
main, actually? @pnkfelix would remember
// ignore-compare-mode-nll to me here. I just wasn't sure whether or not these tests were correct in compiling with NLL or whether that is a bug.
Figured I'd need to check that before just marking them all as OK.
I can check if you want
they might just need to be changed
OK so -- the
associated-types-sutyping-1.rs I think can be fixed if you change from
let _: ... to
let _c: .. =
the problem is that the type annot is being ignored
borrow-tuple-fields.rs needs to be changed to use the reference
let x: (Box<_>, _) = (box 1, 2); let r = &x.0; let y = x; //~ ERROR cannot move out of `x` because it is borrowed
let x: (Box<_>, _) = (box 1, 2); let r = &x.0; let y = x; //~ ERROR cannot move out of `x` because it is borrowed drop(r);
ok, I'm going to stop there because I have to do something else, but maybe that helps @davidtwco :)
Thanks. I'll change those two and any others I can spot, otherwise I'll add an ignore comment to them in a separate commit so it's easy to differentiate the tests I changed due to this and everything else moving around.
one possibility: open a tracking issue and dump them in a checklist
they are almost certainly what @pnkfelix calls "weak tests"
It already has merge conflicts, which is annoying.
I'm not even sure how to keep this mergable - it'll get conflicts every day.
well probably I'll r+ with p=10 or something
Rebasing this is so very confusing.
Yeah, I messed up a little and my "update NLL tests" commit has a bunch of deletions and the next commit has the additions.
Where that commit should only have a handful (~40 or so) test/stderr changes.
I'm going to fix the commits in the PR before attempting to rebase it - should make it much simpler and it's kind-of required so that those tests that got the
ignore-compare-mode-nll can be checked.
@davidtwco hum, tidy looks for the compile-fail directory apparently
@lqd I noticed, not had a chance to fix it yet.