Stream: t-compiler/wg-nll

Topic: weekly meeting October 16


pnkfelix (Oct 16 2018 at 19:20, on Zulip):

hey @WG-compiler-nll , we'll be starting our weekly "standup" meeting here in about 10 minutes!

pnkfelix (Oct 16 2018 at 19:31, on Zulip):

okay; I know some people are travelling today ...

pnkfelix (Oct 16 2018 at 19:32, on Zulip):

as usual, here is the NLL Triage Paper doc: https://paper.dropbox.com/doc/Non-lexical-lifetimes-NLL-Triage--APYgI~kUTrAATYrJI99crJs7Ag-Em2cJrvxQMMFWLE7lE5Be

pnkfelix (Oct 16 2018 at 19:32, on Zulip):

I'll post my status update after the meeting... sorry for not being more on top of that.

pnkfelix (Oct 16 2018 at 19:32, on Zulip):

(the executive summary is that I have two WIP branches for NLL)

pnkfelix (Oct 16 2018 at 19:33, on Zulip):

(well, one that just went from WIP to r? and is nearly r+)

pnkfelix (Oct 16 2018 at 19:33, on Zulip):

We have no I-nominated issues, that's either good or a process failure. :wink:

nikomatsakis (Oct 16 2018 at 19:34, on Zulip):

:)

pnkfelix (Oct 16 2018 at 19:34, on Zulip):

also we have no uncategorized issues; I did some categorization earlier today for that

pnkfelix (Oct 16 2018 at 19:34, on Zulip):

We do have two issues that need milestones: https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3AA-NLL+-label%3ANLL-deferred+-label%3ANLL-fixed-by-NLL+no%3Amilestone+

pnkfelix (Oct 16 2018 at 19:35, on Zulip):

I'll start with "Compiler assertion failed: tcx.migrate_borrowck() when failing to move #[thread_local] static vars." #54797

pnkfelix (Oct 16 2018 at 19:35, on Zulip):

this is assigned to me. This is sort of scary since it seems it is affecting code that is not using NLL and is not opting into the 2018 edition

pnkfelix (Oct 16 2018 at 19:35, on Zulip):

(the ICE is coming from elaborate_drops' construction of a MoveData on the MIR)

pnkfelix (Oct 16 2018 at 19:36, on Zulip):

((because the MoveData construction is yielding an error)

pnkfelix (Oct 16 2018 at 19:36, on Zulip):

I'm not 100% sure what's up here. I tried adding some debug printouts in a local build and then proceeded to fail to replicate the ICE.

nikomatsakis (Oct 16 2018 at 19:37, on Zulip):

hmm

pnkfelix (Oct 16 2018 at 19:37, on Zulip):

Anyway, the compiler has other ICE's, and that hasn't stopped us from shipping. I don't see this as an RC2 blocker as of now

pnkfelix (Oct 16 2018 at 19:37, on Zulip):

But I'm tempted to put it on the Release milestone

pnkfelix (Oct 16 2018 at 19:38, on Zulip):

are there any counterarguments to that proposal?

pnkfelix (Oct 16 2018 at 19:38, on Zulip):

okay then

davidtwco (Oct 16 2018 at 19:38, on Zulip):

I have bandwidth to take on an issue or two this week (not including the type annotations with constants depending on whether @nikomatsakis handles that or not)

nikomatsakis (Oct 16 2018 at 19:39, on Zulip):

are there any counterarguments to that proposal?

sorry, I was busy, but I .. think that makes sense

nikomatsakis (Oct 16 2018 at 19:39, on Zulip):

is this a regression?

pnkfelix (Oct 16 2018 at 19:39, on Zulip):

Accrording to the labels, its a stable-to-nightly regression. But I don't see how that's possible since its using a #![feature(..)]

pnkfelix (Oct 16 2018 at 19:40, on Zulip):

(maybe someone is just going by version numbers rather than channel identities?)

nikomatsakis (Oct 16 2018 at 19:40, on Zulip):

I guess so

nikomatsakis (Oct 16 2018 at 19:40, on Zulip):

it looks like the bug occurs when you have a "move" from a thread-local? (which .. should probably not be allowed?)

nikomatsakis (Oct 16 2018 at 19:41, on Zulip):

ok, anyway, I agree it's not an NLL RC2 blocker I don't think

pnkfelix (Oct 16 2018 at 19:41, on Zulip):

okay I've milestoned it accordingly

pnkfelix (Oct 16 2018 at 19:41, on Zulip):

next up: "NLL doesn't check that user type annotations are well-formed in unreachable code" #54943

pnkfelix (Oct 16 2018 at 19:41, on Zulip):

I think I mentioned this to @nikomatsakis earlier today in the "making plans" topic

pnkfelix (Oct 16 2018 at 19:42, on Zulip):

My opinion: This definitely isn't an RC2 blocker, since unreachable code should never expose unsoundness. @nikomatsakis responded with the opinion that it isn't even a bug. :smile:

pnkfelix (Oct 16 2018 at 19:43, on Zulip):

But I don't know; don't we generally check that types are well formed when they occur even in e.g. functions that are not called?

nikomatsakis (Oct 16 2018 at 19:43, on Zulip):

yeah, if we decided to make this a hard error, it'd obviously be best do so, but I'm not sure that it's wrong. e.g., if you have an annotation like let x: &'static u32 = ... that also will have not give errors if the source can't live that long (and — particularly — under polonius it wouldn't really make sense for it to do so)

pnkfelix (Oct 16 2018 at 19:43, on Zulip):

I guess another take on that question is: Is there a technical reason why we cannot do such a check here?

nikomatsakis (Oct 16 2018 at 19:44, on Zulip):

I think in the special case where the regions are all written out to named lifetimes from the signature, it's plausible to do the check

pnkfelix (Oct 16 2018 at 19:44, on Zulip):

Oh, well ... I guess I was interepreting "well-formedness" as a kind of internal structural invariant of the type expression, rather than some relationship between the unreachable expression and the type?

pnkfelix (Oct 16 2018 at 19:44, on Zulip):

maybe I misunderstand the issue here. I haven't looked at the test it linked

nikomatsakis (Oct 16 2018 at 19:44, on Zulip):

no, I mean, you're not wrong

nikomatsakis (Oct 16 2018 at 19:45, on Zulip):

in this case, it's true that everything you need is in the type. which is why it's borderline.

pnkfelix (Oct 16 2018 at 19:45, on Zulip):

Are you concerned e.g. about checking that in &'a &'b T that we'll ensure that 'b outlives 'a ?

pnkfelix (Oct 16 2018 at 19:45, on Zulip):

/me looking at the test now

nikomatsakis (Oct 16 2018 at 19:45, on Zulip):

it would have that effect, yes, but I think that's ok

pnkfelix (Oct 16 2018 at 19:45, on Zulip):

okay

nikomatsakis (Oct 16 2018 at 19:45, on Zulip):

it's just that — more generally — I'd like to evaluate predicates at a particular spot

pnkfelix (Oct 16 2018 at 19:45, on Zulip):

Maybe lets tag with I-needs-decsion and the Release milestone ?

nikomatsakis (Oct 16 2018 at 19:46, on Zulip):

and there is no particular spot where this one can be evaluated

nikomatsakis (Oct 16 2018 at 19:46, on Zulip):

seems ok

nikomatsakis (Oct 16 2018 at 19:46, on Zulip):

it seems sufficiently obscure that we could fix, particularly given the migration aspect

pnkfelix (Oct 16 2018 at 19:46, on Zulip):

so that we know to come back to this, but we dont' stress about deciding before the RC2 deadline...

nikomatsakis (Oct 16 2018 at 19:46, on Zulip):

that is, I think this still errors under migration?

pnkfelix (Oct 16 2018 at 19:46, on Zulip):

I don't see why it would?

pnkfelix (Oct 16 2018 at 19:47, on Zulip):

The intent is that if something passes under NLL alone, then it should pass under migration...

pnkfelix (Oct 16 2018 at 19:47, on Zulip):

lets just find out

nikomatsakis (Oct 16 2018 at 19:47, on Zulip):

(yes, it does, because region errors are not suppressed there)

pnkfelix (Oct 16 2018 at 19:47, on Zulip):

ah right

nikomatsakis (Oct 16 2018 at 19:47, on Zulip):

(just tested)

pnkfelix (Oct 16 2018 at 19:47, on Zulip):

I forgot about that hack

nikomatsakis (Oct 16 2018 at 19:48, on Zulip):

in this case it buys us time to debate and figure out the nicest fix :)

pnkfelix (Oct 16 2018 at 19:50, on Zulip):

okay, next section: unassigned issues for RC2:

pnkfelix (Oct 16 2018 at 19:50, on Zulip):

https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AA-NLL+-label%3ANLL-deferred+-label%3ANLL-fixed-by-NLL+milestone%3A%22Edition+2018+RC+2%22+no%3Aassignee

pnkfelix (Oct 16 2018 at 19:50, on Zulip):

the first one is super super high priority: "NLL: change compare-mode=nll to use borrowck=migrate" #55118

pnkfelix (Oct 16 2018 at 19:50, on Zulip):

its sort of a thankless mechanical task, I believe

pnkfelix (Oct 16 2018 at 19:51, on Zulip):

namely: it should be a trivial change to compiletest: find out where its doing -Z borrowck=mir to support compare-mode=nll, and change that to -Z borrowck=migrate

pnkfelix (Oct 16 2018 at 19:51, on Zulip):

And then you need to update all the tests

pnkfelix (Oct 16 2018 at 19:51, on Zulip):

(which is I suspect just a matter of running --bless)

nikomatsakis (Oct 16 2018 at 19:52, on Zulip):

:+1:

nikomatsakis (Oct 16 2018 at 19:52, on Zulip):

hopefully so

nikomatsakis (Oct 16 2018 at 19:52, on Zulip):

I'd volunteer but right now i'm kind of pressed for time with Rust Belt Rust prep (ps, won't be around on Friday much I suspect)

pnkfelix (Oct 16 2018 at 19:52, on Zulip):

So anyway, this should be super simple. I'd do it myself but I think I want to focus my energy on my RC2 bugs...

pnkfelix (Oct 16 2018 at 19:52, on Zulip):

So if we can get a volunteer for it tonight, that would be really nice

davidtwco (Oct 16 2018 at 19:53, on Zulip):

I can do that.

pnkfelix (Oct 16 2018 at 19:53, on Zulip):

awesome!

pnkfelix (Oct 16 2018 at 19:53, on Zulip):

assigning to @davidtwco

pnkfelix (Oct 16 2018 at 19:54, on Zulip):

if you need assistance, feel free to ping me. I'm probably the one to blame for most of the nightmares in compiletest right now

pnkfelix (Oct 16 2018 at 19:54, on Zulip):

next up: "nll type anntation not preserved for non-normalized projections" #54940

pnkfelix (Oct 16 2018 at 19:54, on Zulip):

hmm

nikomatsakis (Oct 16 2018 at 19:54, on Zulip):

oh bother, I can perhaps investigate that

nikomatsakis (Oct 16 2018 at 19:55, on Zulip):

I suspect I know the cause

pnkfelix (Oct 16 2018 at 19:55, on Zulip):

well if you're short on time right now

pnkfelix (Oct 16 2018 at 19:55, on Zulip):

...

pnkfelix (Oct 16 2018 at 19:55, on Zulip):

it doesn't perfectly overlap with my own user type annotations work

pnkfelix (Oct 16 2018 at 19:55, on Zulip):

but its in the same ballpark ...

nikomatsakis (Oct 16 2018 at 19:55, on Zulip):

well, it's not the same level of urgency

nikomatsakis (Oct 16 2018 at 19:55, on Zulip):

i.e., it might be ok if I tackle it on Friday

pnkfelix (Oct 16 2018 at 19:55, on Zulip):

Well I wanted to talk about that

nikomatsakis (Oct 16 2018 at 19:56, on Zulip):

(I think that a fix will build on https://github.com/rust-lang/rust/pull/55093 though, so that prob does want a review)

pnkfelix (Oct 16 2018 at 19:56, on Zulip):

Both my current user annotation issue (#54570) and this one (#54940) are on the RC2 milestone

pnkfelix (Oct 16 2018 at 19:56, on Zulip):

Do we want #54940 to block us turning on borrowck=migrate for 2018 edition in RC2 ?

pnkfelix (Oct 16 2018 at 19:57, on Zulip):

okay, I'll get on #55093 pronto

pnkfelix (Oct 16 2018 at 19:57, on Zulip):

I guess if all these other user-annotation issues are RC2 blockers, then #54940 should be one too

pnkfelix (Oct 16 2018 at 19:58, on Zulip):

just seems like one of those hydra-problems: cut off one head and two more grow in its place...

nikomatsakis (Oct 16 2018 at 19:58, on Zulip):

my feeling is

nikomatsakis (Oct 16 2018 at 19:58, on Zulip):

#54570 is more imp't

nikomatsakis (Oct 16 2018 at 19:58, on Zulip):

for two reasons

nikomatsakis (Oct 16 2018 at 19:58, on Zulip):

1. it seems easier to hit

nikomatsakis (Oct 16 2018 at 19:58, on Zulip):

2. it is — I suspect — more invasive

nikomatsakis (Oct 16 2018 at 19:58, on Zulip):

and hence a "less comfortable" backport

pnkfelix (Oct 16 2018 at 19:59, on Zulip):

certainly the way I've been resolving it feels more invasive

pnkfelix (Oct 16 2018 at 19:59, on Zulip):

okay. that sounds reasonable

pnkfelix (Oct 16 2018 at 19:59, on Zulip):

so we'll see how this week goes then w.r.t. #54940 ...

nikomatsakis (Oct 16 2018 at 19:59, on Zulip):

I dont' think #54940 is really a blocker personally

pnkfelix (Oct 16 2018 at 19:59, on Zulip):

right. if its still open in a week, then we'll talk about it then, right?

nikomatsakis (Oct 16 2018 at 19:59, on Zulip):

particularly since borrowck=migrate mitigates a lot of these issues

pnkfelix (Oct 16 2018 at 19:59, on Zulip):

migrate won't mitigate this though

nikomatsakis (Oct 16 2018 at 19:59, on Zulip):

which tbh I hadn't realized until today

nikomatsakis (Oct 16 2018 at 20:00, on Zulip):

hmm yes I suppose you're right

nikomatsakis (Oct 16 2018 at 20:00, on Zulip):

this particular error would've been reported by AST borrowck

pnkfelix (Oct 16 2018 at 20:00, on Zulip):

It was only meant to mitigate NLL-complete issues. I had thought it wouldn't mitigate any NLL-sound issues, but you pointed out one counterexample earlier in the meeting. :)

nikomatsakis (Oct 16 2018 at 20:00, on Zulip):

yes

nikomatsakis (Oct 16 2018 at 20:00, on Zulip):

well I still hope we can tackle these :)

pnkfelix (Oct 16 2018 at 20:01, on Zulip):

Still, I'm happy with this state of things

nikomatsakis (Oct 16 2018 at 20:01, on Zulip):

but I also think we're getting down to increasingly obscure things

nikomatsakis (Oct 16 2018 at 20:01, on Zulip):

right

pnkfelix (Oct 16 2018 at 20:01, on Zulip):

okay. Here's what I'm going to do: I'm going to assign both myself and @nikomatsakis to #54940

pnkfelix (Oct 16 2018 at 20:01, on Zulip):

But that's only so that it shows up on my list of bugs when I look for things to tackle

pnkfelix (Oct 16 2018 at 20:02, on Zulip):

My expectation is that @nikomatsakis will address it, if they have time.

pnkfelix (Oct 16 2018 at 20:03, on Zulip):

okay I think that's everything I wanted to cover

pnkfelix (Oct 16 2018 at 20:04, on Zulip):

Any Q's from the other participants?

pnkfelix (Oct 16 2018 at 20:04, on Zulip):

I know some people are seeking work items

nikomatsakis (Oct 16 2018 at 20:04, on Zulip):

if it's ok with @davidtwco, I think I'll just try to tackle constants, since I suspect it's a small edit and they haven't started yet (and I'm trying to knock off things)

nikomatsakis (Oct 16 2018 at 20:04, on Zulip):

well that said

nikomatsakis (Oct 16 2018 at 20:04, on Zulip):

maybe I should investigate #54940 instead :)

nikomatsakis (Oct 16 2018 at 20:04, on Zulip):

(I have an hour or so right now I had planned to spend on something in this area)

pnkfelix (Oct 16 2018 at 20:05, on Zulip):

maybe we should have a dedicated topic area for people who are seeking work items to post in

pnkfelix (Oct 16 2018 at 20:06, on Zulip):

so that we can get a kind of asynchronous flow going there?

nikomatsakis (Oct 16 2018 at 20:06, on Zulip):

that's an interesting idea

nikomatsakis (Oct 16 2018 at 20:06, on Zulip):

/me tries to think of a funny topic line

nikomatsakis (Oct 16 2018 at 20:06, on Zulip):

"coders seeking bugs"

memoryruins (Oct 16 2018 at 20:07, on Zulip):

lol

memoryruins (Oct 16 2018 at 20:07, on Zulip):

(sorry im in and out right now)
did you cover this issue @pnkfelix ? you mentioned you wanted to this morning https://github.com/rust-lang/rust/issues/55085

pnkfelix (Oct 16 2018 at 20:08, on Zulip):

I debated internally about it, and then got around the matter of #55085 by mentioning it in the "making plans" topic

pnkfelix (Oct 16 2018 at 20:09, on Zulip):

here: https://rust-lang.zulipchat.com/#narrow/stream/122657-wg-nll/subject/making.20plans/near/135901230

memoryruins (Oct 16 2018 at 20:09, on Zulip):

your edit of the diagnostic is definitely clearer

pnkfelix (Oct 16 2018 at 20:10, on Zulip):

Well the problem is that I didn't just edit the diagnostic

pnkfelix (Oct 16 2018 at 20:10, on Zulip):

I editted the source code itself

pnkfelix (Oct 16 2018 at 20:10, on Zulip):

While we could inject spaces into the source code we prsent

pnkfelix (Oct 16 2018 at 20:10, on Zulip):

we tend ... to avoid doing that when we're presenting highlights ...

pnkfelix (Oct 16 2018 at 20:11, on Zulip):

clearly we should be emitting box characters like ┰ ┖

memoryruins (Oct 16 2018 at 20:12, on Zulip):

ah yea, makes sense. I will not be around til after next monday, but I could try to edit the diagnostics, run --bless and check if it makes a mess of things or not

memoryruins (Oct 16 2018 at 20:13, on Zulip):

if there is a concern of it making formatting look incredibly weird

pnkfelix (Oct 16 2018 at 20:13, on Zulip):

ooops, I forgot the </sarcasm> tag

pnkfelix (Oct 16 2018 at 20:13, on Zulip):

I didn't mean to imply that was the correct change here

memoryruins (Oct 16 2018 at 20:13, on Zulip):

hahah, no not the boxes

memoryruins (Oct 16 2018 at 20:13, on Zulip):

the spacing of the bracket

memoryruins (Oct 16 2018 at 20:13, on Zulip):

in the first edit, unless if that was /s too

pnkfelix (Oct 16 2018 at 20:14, on Zulip):

oh, you think we would be justified in injecting the spaces?

pnkfelix (Oct 16 2018 at 20:14, on Zulip):

I'm ... not as opposed to that

pnkfelix (Oct 16 2018 at 20:14, on Zulip):

but there was one other bug once

pnkfelix (Oct 16 2018 at 20:14, on Zulip):

where instead of presenting the source code as written (by consulting the span)

pnkfelix (Oct 16 2018 at 20:14, on Zulip):

someone was presenting a reconstructed expression (or type, can't remember)

pnkfelix (Oct 16 2018 at 20:15, on Zulip):

and I remember being really annoyed at the time, because I got confused by the resulting diagnostic

pnkfelix (Oct 16 2018 at 20:15, on Zulip):

anyway this strikes me as something that might need broader discussion than just this WG

memoryruins (Oct 16 2018 at 20:15, on Zulip):

I doubt its always justified, for both formatting and that, but maybe it could fit somewhere? very low priority though

pnkfelix (Oct 16 2018 at 20:16, on Zulip):

I don't mind experimenting with the idea

memoryruins (Oct 16 2018 at 20:16, on Zulip):

but I wouldnt mind experimenting yea

memoryruins (Oct 16 2018 at 20:16, on Zulip):

(next week)

pnkfelix (Oct 16 2018 at 20:16, on Zulip):

just don't be surprised if any PR you put up gets an immediate r-, a pointer to the RFC process, and perhaps a bunch of confused emojis ...

memoryruins (Oct 16 2018 at 20:17, on Zulip):

lol

pnkfelix (Oct 16 2018 at 20:17, on Zulip):

another option

pnkfelix (Oct 16 2018 at 20:17, on Zulip):

might be to present the span as immediately following the ;

pnkfelix (Oct 16 2018 at 20:17, on Zulip):

like:

15 |     };
   |     - - borrowed value needs to live until here
   |     |
   |     `heap_ref` dropped here while still borrowed
pnkfelix (Oct 16 2018 at 20:18, on Zulip):

that doesn't need any editing of the original source

pnkfelix (Oct 16 2018 at 20:18, on Zulip):

and it might have the same desired end effect

memoryruins (Oct 16 2018 at 20:18, on Zulip):

oh, thats.. much more reasonable

pnkfelix (Oct 16 2018 at 20:18, on Zulip):

(deleted)

pnkfelix (Oct 16 2018 at 20:18, on Zulip):

ack!

pnkfelix (Oct 16 2018 at 20:19, on Zulip):

okay, that's the sign that its close to bedtime for me and my butterfingers

pnkfelix (Oct 16 2018 at 20:19, on Zulip):

thanks to everyone for coming!

memoryruins (Oct 16 2018 at 20:19, on Zulip):

:wave:

pnkfelix (Oct 16 2018 at 20:20, on Zulip):

oh, thats.. much more reasonable

You would think its reasonable, then you'll see cases like };next_stmt();

Last update: Nov 21 2019 at 13:05UTC