Stream: t-compiler/wg-nll

Topic: weekly meeting November 6


pnkfelix (Nov 06 2018 at 20:32, on Zulip):

hi @WG-compiler-nll

pnkfelix (Nov 06 2018 at 20:32, on Zulip):

sorry I'm a little late (and I failed to send a note earlier like I normally do)

pnkfelix (Nov 06 2018 at 20:33, on Zulip):

so I don't know if we'll see @nikomatsakis today, since they are busy at SPLASH

pnkfelix (Nov 06 2018 at 20:34, on Zulip):

but I'm hoping there isn't too much that would need their attention anyway...

pnkfelix (Nov 06 2018 at 20:34, on Zulip):

I went through the list of NLL triage topics earlier today, as you can see if you go look at the "making plans" topic from earlier today

pnkfelix (Nov 06 2018 at 20:35, on Zulip):

the main two things from that exercise are the following

pnkfelix (Nov 06 2018 at 20:36, on Zulip):

1. who can/should we assign to resolve each of the two issues that are currently on the Release milestone?

pnkfelix (Nov 06 2018 at 20:36, on Zulip):

2. what P-level should we assign to "[regression - rust2018]: unused_mut lint false positives on nightly" #55344

Matthew Jasper (Nov 06 2018 at 20:36, on Zulip):

#54943 doesn't apply to migrate mode

pnkfelix (Nov 06 2018 at 20:37, on Zulip):

it doesn't?

pnkfelix (Nov 06 2018 at 20:37, on Zulip):

things that compile in migrate mode and shouldn't seem like they apply to migrate mode, no?

Matthew Jasper (Nov 06 2018 at 20:38, on Zulip):

It doesn't compile in migrate mode, the same as with AST

pnkfelix (Nov 06 2018 at 20:38, on Zulip):

(that is, my rule of thumb is that only issues that are NLL-complete get to go through the migration loophole) ... Or are you saying that since the migration mode does the old region checking, #54943 doesn't apply to it?

pnkfelix (Nov 06 2018 at 20:38, on Zulip):

oh that's fantastic

pnkfelix (Nov 06 2018 at 20:38, on Zulip):

woot

pnkfelix (Nov 06 2018 at 20:39, on Zulip):

should it remain P-high ?

davidtwco (Nov 06 2018 at 20:39, on Zulip):

I glanced at the issues and didn't feel confident that I'd be able to make much headway on either.

pnkfelix (Nov 06 2018 at 20:40, on Zulip):

oh man I even wrote a comment explaining all of this 3 weeks ago

Matthew Jasper (Nov 06 2018 at 20:40, on Zulip):

It's probably higher priority that anything else NLL related that I currently have any plans to work on, if that's anything to go by.

pnkfelix (Nov 06 2018 at 20:41, on Zulip):

okay I'm going to leave it as P-high

pnkfelix (Nov 06 2018 at 20:42, on Zulip):

and I'll assign it to myself for now, to try to keep it properly on my radar

pnkfelix (Nov 06 2018 at 20:44, on Zulip):

I have to be up front though: I am going to go on leave once my twins are born, which will happen sometime in the next 5 to 10 days...

pnkfelix (Nov 06 2018 at 20:45, on Zulip):

so anything that I take could quite likely get quickly unassigned from me

pnkfelix (Nov 06 2018 at 20:45, on Zulip):

anyway, I'll leave #55511 unassigned for now. Maybe I'll find time to look at it

pnkfelix (Nov 06 2018 at 20:45, on Zulip):

The other topic then was what to do with "[regression - rust2018]: unused_mut lint false positives on nightly" #55344

pnkfelix (Nov 06 2018 at 20:46, on Zulip):

personally I don't think it would be a disaster if this takes a while to get addressed...

davidtwco (Nov 06 2018 at 20:46, on Zulip):

I could look into that.

davidtwco (Nov 06 2018 at 20:47, on Zulip):

I notice you're assigned, so only if you aren't already.

pnkfelix (Nov 06 2018 at 20:47, on Zulip):

I think it would be good for you to take it

Matthew Jasper (Nov 06 2018 at 20:48, on Zulip):

The only thing that we would fix is the lint?

pnkfelix (Nov 06 2018 at 20:48, on Zulip):

I don't know

pnkfelix (Nov 06 2018 at 20:48, on Zulip):

It depends on what strategy we take

pnkfelix (Nov 06 2018 at 20:48, on Zulip):

Which requires some exploration of the options

pnkfelix (Nov 06 2018 at 20:49, on Zulip):

one of the options I was considering was to have the various lints for the uses (or lack thereof) of a local variable not fire if the local variable's declaration is itself not reachable

pnkfelix (Nov 06 2018 at 20:50, on Zulip):

(And maybe introduce a single new warning saying that the declaration is dead code.)

pnkfelix (Nov 06 2018 at 20:50, on Zulip):

(at least, from what I can tell we don't do that today, and we could...)

pnkfelix (Nov 06 2018 at 20:50, on Zulip):

But its also possible that any decision here would turn into a big bikeshed discussion. (with lots of stakeholders outside of NLL) :(

Matthew Jasper (Nov 06 2018 at 20:51, on Zulip):

If we want to do more than that we should definitely have some idea before December

Matthew Jasper (Nov 06 2018 at 20:51, on Zulip):

There's already an unreachable code lint

pnkfelix (Nov 06 2018 at 20:52, on Zulip):

oh good point

pnkfelix (Nov 06 2018 at 20:52, on Zulip):

I had misremembered and thought the unreachable code only complained about the assignment, but it does complain about the binding itself.

pnkfelix (Nov 06 2018 at 20:53, on Zulip):

so maybe a 'fix" here is easier than I thought: make the unused_mut lint only fire if the declaration in question is also reachable (according to whatever logic the unreachable_code lint uses) ?

pnkfelix (Nov 06 2018 at 20:54, on Zulip):

(here's my demo of it complaining about the binding itself: play)

Matthew Jasper (Nov 06 2018 at 20:55, on Zulip):

There's also the issue of something like

pub fn sum_nan() {
    let mut v;
    v = 0;
    assert_eq!(v, 0);
    let () = return;
    v = 1;
    assert_eq!(v, 1);
}
pnkfelix (Nov 06 2018 at 20:55, on Zulip):

This would still be a "regression" in cases where the unreachable code itself does not contain any mutations of the local (and thus one might argue that the unused_mut lint "should" fire) ; as demonstratred here play

pnkfelix (Nov 06 2018 at 20:56, on Zulip):

@Matthew Jasper your example still fires warning: variable does not need to be mutable under the 2015 edition.

pnkfelix (Nov 06 2018 at 20:57, on Zulip):

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2015&gist=46928cd7c01b70fd64bda318016c0bd0

Matthew Jasper (Nov 06 2018 at 20:57, on Zulip):

Interesting

pnkfelix (Nov 06 2018 at 20:58, on Zulip):

@davidtwco maybe part of the task for #55344 would be to engage with any potential stakeholders who work on these lints and get their input on what they think the "right" (or "best", or "acceptable") behavior is

davidtwco (Nov 06 2018 at 20:58, on Zulip):

Sure thing.

pnkfelix (Nov 06 2018 at 20:58, on Zulip):

@Matthew Jasper yeah at this point I'm not sure I grok what is going on here

pnkfelix (Nov 06 2018 at 21:00, on Zulip):

okay well anyway I've managed to fill up 29 minutes with relative nonsense. :)

pnkfelix (Nov 06 2018 at 21:00, on Zulip):

Are there any topics you all wanted to discuss?

Matthew Jasper (Nov 06 2018 at 21:02, on Zulip):

No, I'll happily have another week not working on NLL compiler issues.

pnkfelix (Nov 06 2018 at 21:06, on Zulip):

okay then I'm going to call this meeting over. THanks you both for attending!

Last update: Nov 21 2019 at 13:05UTC