Stream: t-compiler/wg-nll

Topic: weekly meeting 2019.01.09


nikomatsakis (Jan 09 2019 at 20:25, on Zulip):

Hello @WG-compiler-nll :wave: meeting in 5 minutes

nikomatsakis (Jan 09 2019 at 20:28, on Zulip):

Triage document

blitzerr (Jan 09 2019 at 20:31, on Zulip):

:wave:

nikomatsakis (Jan 09 2019 at 20:34, on Zulip):

@blitzerr you could note down the closure work in the paper document ..

blitzerr (Jan 09 2019 at 20:34, on Zulip):

@nikomatsakis will do that

nikomatsakis (Jan 09 2019 at 20:35, on Zulip):

So probably a good idea is for us to look at nominated issues and things

nikomatsakis (Jan 09 2019 at 20:35, on Zulip):

oh which there are several

Matthew Jasper (Jan 09 2019 at 20:35, on Zulip):

Some are just nominated for close though

nikomatsakis (Jan 09 2019 at 20:35, on Zulip):

maybe we can discuss them briefly

nikomatsakis (Jan 09 2019 at 20:35, on Zulip):

yep

nikomatsakis (Jan 09 2019 at 20:36, on Zulip):

[NLL] Bad higher ranked subtype error #57374

nikomatsakis (Jan 09 2019 at 20:36, on Zulip):

so the error messages are ungreat for certain errors -- this will become relevant when we try to move past migration mode

nikomatsakis (Jan 09 2019 at 20:36, on Zulip):

@Matthew Jasper, I'm not sure, did you do any work on this? I know you were asking some relevant questions in #t-compiler (and uncovered, iirc, some surprising behavior)

nikomatsakis (Jan 09 2019 at 20:36, on Zulip):

not sure if you ever filed an issue on that btw

nikomatsakis (Jan 09 2019 at 20:37, on Zulip):

in any case, I think we ought to consider this P-high and somebody ought to work on it. I could do it if needed, but would rather mentor (or maybe someone else just wants to tackle)

Matthew Jasper (Jan 09 2019 at 20:37, on Zulip):

I didn't file that as an issue. I'll file one for the diagnostics issue there soon.

nikomatsakis (Jan 09 2019 at 20:38, on Zulip):

this could also be something to "farm out" to some folks in #wg-traits

nikomatsakis (Jan 09 2019 at 20:38, on Zulip):

since it's kind of overlapping

lqd (Jan 09 2019 at 20:38, on Zulip):

is it doable by "beginners" (say, me) ?

nikomatsakis (Jan 09 2019 at 20:39, on Zulip):

probably

nikomatsakis (Jan 09 2019 at 20:39, on Zulip):

I don't remember too many details, but I already made a "nicer" version of this error,

nikomatsakis (Jan 09 2019 at 20:39, on Zulip):

though it has some bugs of its own

nikomatsakis (Jan 09 2019 at 20:39, on Zulip):

but for whatever reason that doesn't kick in in the NLL checker

nikomatsakis (Jan 09 2019 at 20:39, on Zulip):

I suspect it's not too hard to make it kick in, but maybe not

nikomatsakis (Jan 09 2019 at 20:39, on Zulip):

I was thinking that it might be a good fit for the "schedule an hour to talk it over" sort of thing

lqd (Jan 09 2019 at 20:40, on Zulip):

I can try then (with possible help/mentoring :)

nikomatsakis (Jan 09 2019 at 20:40, on Zulip):

ok, we can chat async about whether to schedule a session to disucss or what

nikomatsakis (Jan 09 2019 at 20:41, on Zulip):

region error messages involving impls are confusing #52742

nikomatsakis (Jan 09 2019 at 20:41, on Zulip):

@Matthew Jasper nominated to discuss whether to keep open

nikomatsakis (Jan 09 2019 at 20:41, on Zulip):

I'm inclined to thikn current output is "good enough" and we can close

nikomatsakis (Jan 09 2019 at 20:41, on Zulip):

we can maybe do better but it doesn't seem like a burning problem

nikomatsakis (Jan 09 2019 at 20:42, on Zulip):

NLL: missing note that "borrowed value needs to live until here" (sometimes?) #51168

nikomatsakis (Jan 09 2019 at 20:43, on Zulip):

Similarly, opened to discuss whether to keep it open

nikomatsakis (Jan 09 2019 at 20:44, on Zulip):

Current output with NLL:

error[E0515]: cannot return reference to local data `x`
  --> $DIR/issue-11925.rs:8:35
   |
LL |         let f = to_fn_once(move|| &x); //~ ERROR does not live long enough
   |                                   ^^ returns a reference to data owned by the current function

Before NLL:

error[E0597]: `x` does not live long enough
  --> $DIR/issue-11925.rs:8:36
   |
LL |         let f = to_fn_once(move|| &x); //~ ERROR does not live long enough
   |                                    ^
   |                                    |
   |                                    borrowed value does not live long enough
   |                                    `x` dropped here while still borrowed
...
LL | }
| - borrowed value needs to live until here
nikomatsakis (Jan 09 2019 at 20:44, on Zulip):

I think I agree with @Matthew Jasper here too, we should close, the new output is just better.

nikomatsakis (Jan 09 2019 at 20:44, on Zulip):

and the note wouldn't really make sense

Matthew Jasper (Jan 09 2019 at 20:44, on Zulip):

and there isn't really a way for us to report "borrowed value needs to live until here" because we don't know at the point we report.

Matthew Jasper (Jan 09 2019 at 20:45, on Zulip):

we check closures "inside out" with NLL

nikomatsakis (Jan 09 2019 at 20:45, on Zulip):

right

nikomatsakis (Jan 09 2019 at 20:45, on Zulip):

ok, closed

nikomatsakis (Jan 09 2019 at 20:45, on Zulip):

# [NLL] borrowed-universal-test.rs output is not great #48645

nikomatsakis (Jan 09 2019 at 20:46, on Zulip):

scroll down to the bottom, where @Matthew Jasper showed new output

centril (Jan 09 2019 at 20:46, on Zulip):

does the NLL error message need more "air"?

nikomatsakis (Jan 09 2019 at 20:47, on Zulip):

I think this message is suffering somewhat from the "overlapping spans" problem

nikomatsakis (Jan 09 2019 at 20:47, on Zulip):

I'm trying to remember some keywords from that issue I filed about a new approach to formatting cases like these...

centril (Jan 09 2019 at 20:48, on Zulip):

the pre-NLL error message has the nice vertical spacing

nikomatsakis (Jan 09 2019 at 20:48, on Zulip):

The current message feels like it could be improved, but it doesn't suffer from the problems it had when we filed the issue exactly.

nikomatsakis (Jan 09 2019 at 20:49, on Zulip):

I guess the key points to get across are kind of "we made a temporary, it will get freed, but you are returning a reference to it"

nikomatsakis (Jan 09 2019 at 20:49, on Zulip):

if we are going to keep this open, I would prefer to update the subject line to something more specific

lqd (Jan 09 2019 at 20:50, on Zulip):

your suggestion does get these key points across well

centril (Jan 09 2019 at 20:50, on Zulip):

@nikomatsakis yeah I just had that thought when seeing the message here; my note is just about formatting, not content

centril (Jan 09 2019 at 20:50, on Zulip):

the content is nice

nikomatsakis (Jan 09 2019 at 20:51, on Zulip):

I guess the key points to get across are kind of "we made a temporary, it will get freed, but you are returning a reference to it"

I think we don't clearly indicate that it will get freed in the current error

nikomatsakis (Jan 09 2019 at 20:51, on Zulip):

it's sort of implied by "returns a value referencing data owned by the current function", but you may not realize that data "owned by current fn" gets freed

nikomatsakis (Jan 09 2019 at 20:52, on Zulip):

anyway, I'm of two minds about it. I could imagine closing this, for sure, and just trying to improve the formatting (which is an independent problem, but perhaps one we should try to prioritize more)

nikomatsakis (Jan 09 2019 at 20:52, on Zulip):

we should decide and move on :) or just leave for later

lqd (Jan 09 2019 at 20:53, on Zulip):

could it be an issue to ask for new contributors ?

nikomatsakis (Jan 09 2019 at 20:53, on Zulip):

I'm not sure.

nikomatsakis (Jan 09 2019 at 20:54, on Zulip):

let's leave it for now and maybe come back to it

nikomatsakis (Jan 09 2019 at 20:54, on Zulip):

I'll put a few notes

lqd (Jan 09 2019 at 20:54, on Zulip):

I feel it's not extremely bad but your suggestion seems better so it might be nice to keep it open

nikomatsakis (Jan 09 2019 at 20:55, on Zulip):

let's call it P-low?

nikomatsakis (Jan 09 2019 at 20:55, on Zulip):

ah, this is was my idea for an alternative approach to formatting

nikomatsakis (Jan 09 2019 at 20:56, on Zulip):

final nominated issue: Is an InlineAsm output a potential use that needs to activate a borrow? #46891

nikomatsakis (Jan 09 2019 at 20:56, on Zulip):

I thnk @Matthew Jasper is pointed out that this issue is just out of date, right @Matthew Jasper ?

Matthew Jasper (Jan 09 2019 at 20:57, on Zulip):

Yes, it applies to code that doesn't exist implementing a version of 2PB that we may never have.

nikomatsakis (Jan 09 2019 at 20:57, on Zulip):

lol ok

nikomatsakis (Jan 09 2019 at 20:57, on Zulip):

let's close :)

Matthew Jasper (Jan 09 2019 at 20:57, on Zulip):

and the code that's replaced it doesn't have this issue.

nikomatsakis (Jan 09 2019 at 20:58, on Zulip):

well we have 2 minutes left in our scheduled time :)

Matthew Jasper (Jan 09 2019 at 20:58, on Zulip):

:upside_down:

nikomatsakis (Jan 09 2019 at 20:58, on Zulip):

I do wonder if we should shoot for a kind of "steering meeting" to discuss some more meta issues

nikomatsakis (Jan 09 2019 at 20:59, on Zulip):

I feel like since NLL is shipping it's become sort of harder to stay focused, but I also feel like there remains a lot of work to do

nikomatsakis (Jan 09 2019 at 20:59, on Zulip):

e.g., finishing the migration, polonius, plus other related features

nikomatsakis (Jan 09 2019 at 20:59, on Zulip):

should we try to do that next week?

nikomatsakis (Jan 09 2019 at 20:59, on Zulip):

(steering discussion?)

lqd (Jan 09 2019 at 20:59, on Zulip):

sure

nikomatsakis (Jan 09 2019 at 21:00, on Zulip):

maybe lengthen the meeting to 1hr?

nikomatsakis (Jan 09 2019 at 21:00, on Zulip):

or see how far we get in 30 min

lqd (Jan 09 2019 at 21:00, on Zulip):

Felix will be back right ?

nikomatsakis (Jan 09 2019 at 21:00, on Zulip):

I think so -- I would like to wait for @pnkfelix to get back

nikomatsakis (Jan 09 2019 at 21:00, on Zulip):

(Some food for thought: I also wonder if it makes sense to split the "NLL working group" into different working groups)

Matthew Jasper (Jan 09 2019 at 21:00, on Zulip):

I think maybe a longer meeting, and prioritize those topics

nikomatsakis (Jan 09 2019 at 21:00, on Zulip):

sounds good, I'll leave a note in the paper so we remember :)

nikomatsakis (Jan 09 2019 at 21:01, on Zulip):

I can also edit the calendar event

nikomatsakis (Jan 09 2019 at 21:01, on Zulip):

thanks @Matthew Jasper for doing that triage

nikomatsakis (Jan 09 2019 at 21:01, on Zulip):

we should do more of it

lqd (Jan 09 2019 at 21:01, on Zulip):

thanks @Matthew Jasper :thumbs_up:

lqd (Jan 09 2019 at 21:02, on Zulip):

did we want/need to talk about other topics than the nominated issues ?

Matthew Jasper (Jan 09 2019 at 21:03, on Zulip):

I also looked through the P-High and NLL-sound issue for those blocking migrate on 2015. But they all seem to be assigned, so I don't think that it needs urgent discussion.

blitzerr (Jan 09 2019 at 21:03, on Zulip):

Are we adjourned for today ?

nikomatsakis (Jan 09 2019 at 21:03, on Zulip):

I think so

blitzerr (Jan 09 2019 at 21:04, on Zulip):

Thanks everyone

lqd (Jan 09 2019 at 21:04, on Zulip):

(if so, have a good evening/afternoon everyone :wave: :)

Keith Yeung (Jan 09 2019 at 21:08, on Zulip):

will we split to NLL frog and NLL-MIR?

Last update: Nov 21 2019 at 13:35UTC