You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll ignore the cases where MIR borrowck correctly adds new "unused mut" lint warnings which were previously not found by the AST borrowck: while they are new warnings, the unused muts were easily removed from the rustc code in order to keep building, so I marked them as ok (but can produce the list of cases if need be).
I tested by manually enabling the NLL feature in crates, #![cfg_attr(not(stage0), feature(nll))], and building. This doesn't test the submodules, stdsimd, and tools.
librustc_passes: doesn't build right now and seems correct (apparently this pattern comes up often, so maybe we can accept this in the future, with additions to 2-phase-borrows), minimized repro here for convenience.
Now that all of those issues are fixed, I've added #52671 to the list since it is also blocking bootstrap.
With that fix bootstrapping still breaks due to the unused mut lint and a case where two phase borrows don't track activation through unsized coercions. I've created PRs for those.
Ok so rustc almost bootstraps, but changes since my last comment prevent it from doing so (more unused mut that AST misses, an issue with incorrect lifetime annotations). At this point I think that this will have to be checked with CI.
I sort of presume that we can enable -Zborrowck=mir across all compilations in rust-lang/rust as soon as we believe the performance is good enough and the compiler works with it.
Or at least -Z borrowck=migrate -Z two-phase-borrows. I'm not sure about going all the way to -Z borrowck=mir -Z two-phase-borrows in our first step here.
Activity
lqd commentedon Jun 29, 2018
Here's a summary of this adventure :)
I'll ignore the cases where MIR borrowck correctly adds new "unused mut" lint warnings which were previously not found by the AST borrowck: while they are new warnings, the unused muts were easily removed from the rustc code in order to keep building, so I marked them as ok (but can produce the list of cases if need be).
I tested by manually enabling the NLL feature in crates,
#![cfg_attr(not(stage0), feature(nll))], and building. This doesn't test the submodules, stdsimd, and tools.Interesting cases
liballoc: doesn't build, already tracked as NLL / MIR-borrowck regression in liballoc #48224 (NLL / MIR-borrowck regression in liballoc #48224 (comment) mentions Niko might have a fix already)
librustc_passes: doesn't build right now and seems correct (apparently this pattern comes up often, so maybe we can accept this in the future, with additions to 2-phase-borrows), minimized repro here for convenience.
librustc_typeck: doesn't build because of incorrect "unused mut" lint warnings [NLL] variable does not need to be mutable #51830. and because of ICE
cannot convert ... to a region vidwhich is librustc_mir/borrow_check/nll/universal_regions.rs:824: cannot convert ReFree ... #51351, and has a minimized repro.libsyntax_ext: doesn't build because of "broken MIR" ICE ICE bootstrapping rustc with NLL enabled #48071, which has a minimal repro here.
Cases of incorrect "unused mut" lint warnings
libcore: used to ICE with
region_obligations not empty(known issue region_obligations not empty #51649).This error has, after I started, become less prominent on master, and now 4 denied warnings prevent building. These are incorrect "unused mut" lint warnings when using move closures, and occurrences of known issue nll: incorrect unused_mut with move closure #51801 (which might be a more minimal reproduction of [NLL] mutability difference #50897)
librustc doesn't build because of incorrect "unused mut" lint warnings nll: incorrect unused_mut with move closure #51801 and [NLL] variable does not need to be mutable #51830, the latter mentions removing a "mut" that doesn't exist in the surface code, and minimized in the issues and for convenience here
librustc_data_structures: used to ICE with
region_obligations not empty(known issue region_obligations not empty #51649). Now doesn't build because of incorrect "unused mut" lint warnings nll: incorrect unused_mut with move closure #51801.librustc_driver: doesn't build because of incorrect "unused mut" lint warnings nll: incorrect unused_mut with move closure #51801.
librustc_lint: doesn't build because of incorrect "unused mut" lint warnings [NLL] variable does not need to be mutable #51830.
librustc_traits: doesn't build because of incorrect "unused mut" lint warnings [NLL] variable does not need to be mutable #51830.
libserialize: doesn't build because of incorrect "unused mut" lint warnings nll: incorrect unused_mut with move closure #51801.
libsyntax: doesn't build because of incorrect "unused mut" lint warnings which I'm not sure we tracked so I filed it as NLL: incorrect "unused mut" lint warning, with multiple closures #51904. A reduced repro is available here. The fact that there are 2 closures seem important here.
Crates without issues
region_obligations not empty(known issue region_obligations not empty #51649). Now ok.nikomatsakis commentedon Jun 29, 2018
Tagging this meta bug as NLL-deferred until the following issues are fixed:
matthewjasper commentedon Jul 29, 2018
Now that all of those issues are fixed, I've added #52671 to the list since it is also blocking bootstrap.
With that fix bootstrapping still breaks due to the unused mut lint and a case where two phase borrows don't track activation through unsized coercions. I've created PRs for those.
Auto merge of #52830 - matthewjasper:bootstrap-prep, r=matthewjasper
Rollup merge of rust-lang#52834 - matthewjasper:allow-zst-conflicts, …
matthewjasper commentedon Aug 2, 2018
Ok so rustc almost bootstraps, but changes since my last comment prevent it from doing so (more unused mut that AST misses, an issue with incorrect lifetime annotations). At this point I think that this will have to be checked with CI.
@Mark-Simulacrum @nikomatsakis @pnkfelix was there a decision on how we want to move rustc/CI towards nll?
Mark-Simulacrum commentedon Aug 2, 2018
I sort of presume that we can enable -Zborrowck=mir across all compilations in rust-lang/rust as soon as we believe the performance is good enough and the compiler works with it.
pnkfelix commentedon Aug 3, 2018
Or at least
-Z borrowck=migrate -Z two-phase-borrows. I'm not sure about going all the way to-Z borrowck=mir -Z two-phase-borrowsin our first step here.pnkfelix commentedon Aug 3, 2018
Although, what am I talking about, we control our own code, we don't need to use the migration path.
matthewjasper commentedon Aug 9, 2018
Closing in favor of #53172