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
{{ message }}
Repository navigation
NLL ICE: "unresolved inference variable in outlives" #52057
The crater run turned up a number of crates encountering an ICE with a message like "unresolved inference variable in outlives" (see list in #52054). I'm not sure what is the problem yet but I'm filing this bug to track the issue.
A good representative is combine-language-2.0.0-beta4, which failed with this log.
It's a bit tricky -- we don't just want to insert a random call to normalize until we've finished generating all the "free regions". That call could produce outlives obligations we have to propagate to the right place. It's not that big a deal, in fact at this point we have generated all the free regions:
Activity
matthewjasper commentedon Jul 11, 2018
Self contained example. Related to #51649?
pnkfelix commentedon Jul 24, 2018
triage re-assigning to self
nikomatsakis commentedon Jul 25, 2018
I think this may have been fixed by #51959. At least @matthewjasper's example no longer reproduces. I'll have to try the original crate.
nikomatsakis commentedon Jul 25, 2018
OK wait. @matthewjasper's example now fails to build, whereas it builds without
nll. It no longer ICEs though.nikomatsakis commentedon Jul 25, 2018
Ah, I see the problem. It arises because we don't normalize types before computing the implied bounds in the universal regions code:
rust/src/librustc_mir/borrow_check/nll/universal_regions.rs
Lines 502 to 506 in fefe816
even though we just "liberated" late-bound regions:
rust/src/librustc_mir/borrow_check/nll/universal_regions.rs
Lines 487 to 492 in fefe816
nikomatsakis commentedon Jul 25, 2018
It's a bit tricky -- we don't just want to insert a random call to normalize until we've finished generating all the "free regions". That call could produce outlives obligations we have to propagate to the right place. It's not that big a deal, in fact at this point we have generated all the free regions:
rust/src/librustc_mir/borrow_check/nll/universal_regions.rs
Line 494 in fefe816
but we still need to route the resulting outlives obligations to the right place. This will take a touch of reorganization in the code.
nikomatsakis commentedon Jul 26, 2018
I'm working on this. It's non-trivial.
nikomatsakis commentedon Jul 26, 2018
But I'm getting there =)
add regression test for rust-lang#52057