Stream: t-compiler/wg-nll

Topic: migration-and-region-errors


nikomatsakis (Aug 06 2018 at 14:33, on Zulip):

ps @pnkfelix and @Matthew Jasper -- regarding https://github.com/rust-lang/rust/pull/53045 -- what is current status here? I was thinking that this might be a case where we want to remember that an error would've been reported, but not issue the error eagerly, so that we can report the error from NLL instead.

That said, I don't know how much this matters. I think that until we go to polonius mode (or at least "location-sensitive outlives" constraints), any errors that old regionck would report would probably still be errors in the new code... not sure if we have any counterexamples...

pnkfelix (Aug 06 2018 at 21:40, on Zulip):

Do you mean “what is current status” as in “should we continue to have this filter in the first place?” Ie “what should we do to bring migration mode in line with NLL mode”?

nikomatsakis (Aug 06 2018 at 21:44, on Zulip):

I mean "what is current behavior of the code"

nikomatsakis (Aug 06 2018 at 21:44, on Zulip):

I believe current behavior is "if in migration mode, report regionck errors as hard errors"

nikomatsakis (Aug 06 2018 at 21:44, on Zulip):

correct?

nikomatsakis (Aug 06 2018 at 21:45, on Zulip):

(but not in #![feature(nll)] mode)

pnkfelix (Aug 06 2018 at 21:49, on Zulip):

Yes

pnkfelix (Aug 06 2018 at 21:49, on Zulip):

That was to fix ... something very bad

pnkfelix (Aug 06 2018 at 21:50, on Zulip):

It’s possible the right fix would have been to somehow record the (silenced) presence of a regional error in the same manner we do an AST borrowck error

pnkfelix (Aug 06 2018 at 21:51, on Zulip):

So that we’d know in migration mode that the subsequent NLL error should be a hard error, not downgraded to a warning

nikomatsakis (Aug 06 2018 at 21:51, on Zulip):

It’s possible the right fix would have been to somehow record the (silenced) presence of a regional error in the same manner we do an AST borrowck error

right, that's what I'm thinking -- but i'm not sure if it matters anymore

nikomatsakis (Aug 06 2018 at 21:52, on Zulip):

given that we are no longer "location sensitive" for outlives relations

pnkfelix (Aug 06 2018 at 21:52, on Zulip):

But we will be at some point

nikomatsakis (Aug 06 2018 at 21:52, on Zulip):

it will matter at some point, yes

nikomatsakis (Aug 06 2018 at 21:52, on Zulip):

though I sort of hope to complete the transition first :)

nikomatsakis (Aug 06 2018 at 21:52, on Zulip):

that is, to remove "old regionck"

pnkfelix (Aug 06 2018 at 21:52, on Zulip):

I was actually wondering while you were on PTO

nikomatsakis (Aug 06 2018 at 21:52, on Zulip):

maybe that is overly ambitious...

pnkfelix (Aug 06 2018 at 21:53, on Zulip):

How hard would it be to put in a -Z location-sensitive-outlives flag?

pnkfelix (Aug 06 2018 at 21:54, on Zulip):

Ie i think people would like to be able to test it out

nikomatsakis (Aug 06 2018 at 21:54, on Zulip):

pretty hard at this point

nikomatsakis (Aug 06 2018 at 21:54, on Zulip):

it'd be easier to fix up polonius probably

nikomatsakis (Aug 06 2018 at 21:54, on Zulip):

not sure what current status of that is...

pnkfelix (Aug 06 2018 at 21:54, on Zulip):

To find out if their code would be accepted under the generalized NLL

pnkfelix (Aug 06 2018 at 21:55, on Zulip):

it might help us head off a number of people filing bugs against NLL completeness

nikomatsakis (Aug 06 2018 at 21:55, on Zulip):

it'd certainly help in diagnosing them

nikomatsakis (Aug 06 2018 at 21:55, on Zulip):

but it can't readily be done

pnkfelix (Aug 06 2018 at 21:55, on Zulip):

But .... it also might be such a good feature, people won’t want to stop using it

pnkfelix (Aug 06 2018 at 21:55, on Zulip):

Okay

nikomatsakis (Aug 06 2018 at 21:55, on Zulip):

though making polonius mode work might be possible...

pnkfelix (Aug 06 2018 at 21:56, on Zulip):

I wasn’t sure if it would be possible to reverse engineer it from the PR’s that removed it

nikomatsakis (Aug 06 2018 at 21:56, on Zulip):

at this point I ripped out tons of the relevant code

nikomatsakis (Aug 06 2018 at 21:56, on Zulip):

and -- to improve perf in various ways -- have refactored a lot of the other related stuff

Jake Goulding (Aug 06 2018 at 23:30, on Zulip):

I'd love a #[feature(nll-polonius)] for my "will this work in the future" tests. I know it's a bit flaky, but still

Last update: Nov 21 2019 at 23:35UTC