Stream: t-compiler/wg-nll

Topic: Handling of empty regions #68550


pnkfelix (Mar 30 2020 at 20:27, on Zulip):

Hey @nikomatsakis , at some point I'd like to discuss with you (and perhaps @Matthew Jasper ) your thoughts on what we should do about empty regions and/or ReEmpty

pnkfelix (Mar 30 2020 at 20:36, on Zulip):

In the case of #68550, we are trying to eval_verify_bound where the lower bound is '_#7r and the verify_bound is AnyBound([OutlivedBy(ReEmpty(U0)), OutlivedBy(ReStatic), OutlivedBy('_#2r)])

pnkfelix (Mar 30 2020 at 20:39, on Zulip):

I did see we have some special case code in rustc_mir::borrow_check::type_check::constraint_conversion to avoid pushing a constraint when the right hand side is ReEmpty(UniverseIndex::ROOT)

pnkfelix (Mar 30 2020 at 20:39, on Zulip):

does eval_verify_bound need some similar special case code, to avoid calling to_region_vid on such regions?

pnkfelix (Mar 30 2020 at 20:40, on Zulip):

or is there a broader change that you think you would be more appropriate?

Matthew Jasper (Mar 30 2020 at 21:01, on Zulip):

I think that having a vid corresponding to each reempty is what we eventually want, I'm not sure if doing that is enough to fix this issue though.

nikomatsakis (Mar 30 2020 at 21:02, on Zulip):

@pnkfelix I happen to be working right now on a PR to extend our handling ReEmpty in/around NLL

nikomatsakis (Mar 30 2020 at 21:02, on Zulip):

and I was wanting to refactor precisely that special-case code

nikomatsakis (Mar 30 2020 at 21:04, on Zulip):

though I'm not exactly sure what I want to do :)

nikomatsakis (Mar 30 2020 at 21:05, on Zulip):

I was expecting to make a vid for each empty, I guess, which means that all variables would then have to include the "element" for their universe

pnkfelix (Mar 31 2020 at 18:56, on Zulip):

@nikomatsakis okay, maybe I'll just assign #68550 to you, then? Since I suspect your refactoring will address it.

nikomatsakis (Mar 31 2020 at 19:20, on Zulip):

that seems ok

Last update: Jun 05 2020 at 22:25UTC