Stream: t-compiler

Topic: weekly meeting 2020-01-09 #54818


pnkfelix (Jan 09 2020 at 14:51, on Zulip):

Hi @T-compiler/meeting ; the triage meeting will be starting in 10 minutes (!)

pnkfelix (Jan 09 2020 at 14:51, on Zulip):

I did pre-triage in a parallel channel last night

pnkfelix (Jan 09 2020 at 14:52, on Zulip):

WG checkins scheduled for today are from @T-compiler/WG-meta and @WG-mir-opt

pnkfelix (Jan 09 2020 at 14:54, on Zulip):

normally I'd see if @Santiago Pastorino can handle both check-ins, but I think they are on vacation

pnkfelix (Jan 09 2020 at 14:54, on Zulip):

@davidtwco are you around? Just want to see if you might provide update from WG-meta in about an hour or so

pnkfelix (Jan 09 2020 at 14:54, on Zulip):

and likewise I'll ping @oli for a similar update from WG-mir-opt

nikomatsakis (Jan 09 2020 at 14:59, on Zulip):

davidtwco are you around? Just want to see if you might provide update from WG-meta in about an hour or so

I can prepare an update, though I don't think much has happened

nikomatsakis (Jan 09 2020 at 14:59, on Zulip):

it's maybe more about "next plans"

pnkfelix (Jan 09 2020 at 15:01, on Zulip):

Hi @T-compiler/meeting! Add a :wave: emoji to show you're here :)

pnkfelix (Jan 09 2020 at 15:01, on Zulip):

And we will have five minutes for ...

pnkfelix (Jan 09 2020 at 15:01, on Zulip):

Announcements

pnkfelix (Jan 09 2020 at 15:02, on Zulip):

last friday, niko and I had our first face-to-face since my move back to the USA

pnkfelix (Jan 09 2020 at 15:03, on Zulip):

I think its safe to say it was the first of many. :)

pnkfelix (Jan 09 2020 at 15:03, on Zulip):

and I also think its safe to say Niko is super-excited about plans

pnkfelix (Jan 09 2020 at 15:03, on Zulip):

(while I think I'm mostly just scared)

nikomatsakis (Jan 09 2020 at 15:04, on Zulip):
nikomatsakis (Jan 09 2020 at 15:05, on Zulip):

that tiny file size was kind of intense

pnkfelix (Jan 09 2020 at 15:05, on Zulip):

for today's meeting, I threw together this https://hackmd.io/iYO7ZJrTRg2E7OEPyeHKfA?both

pnkfelix (Jan 09 2020 at 15:05, on Zulip):

but I didn't have time to curate beyond the beta+stable nominations. We'll have to wing the I-nominated issues.

nikomatsakis (Jan 09 2020 at 15:05, on Zulip):

I think a worthy announcement would be the cool PRs on handling const generics + lazy norm

nikomatsakis (Jan 09 2020 at 15:06, on Zulip):

they're going to be a bit in landing, but we're making progress there

nikomatsakis (Jan 09 2020 at 15:06, on Zulip):

e.g., https://github.com/rust-lang/rust/pull/67890, credit to @Ben Lewis

pnkfelix (Jan 09 2020 at 15:09, on Zulip):

okay lets get started

pnkfelix (Jan 09 2020 at 15:10, on Zulip):

as usual, the running agenda is linked at #54818 ; I already mentioned the hackmd link

pnkfelix (Jan 09 2020 at 15:11, on Zulip):

we have four beta nominations

pnkfelix (Jan 09 2020 at 15:11, on Zulip):

beta-nom 1/4: "Do not ICE on lifetime error involving closures" #67687

pnkfelix (Jan 09 2020 at 15:12, on Zulip):

Seems fine.

pnkfelix (Jan 09 2020 at 15:12, on Zulip):

beta-accepted

pnkfelix (Jan 09 2020 at 15:13, on Zulip):

(We discussed a bit last week, for those experiencing deja vu)

nikomatsakis (Jan 09 2020 at 15:13, on Zulip):

We discussed this last week I think.. it hadn't landed at that time?

nikomatsakis (Jan 09 2020 at 15:13, on Zulip):

Something like that

pnkfelix (Jan 09 2020 at 15:13, on Zulip):

beta-nom 2/4: "Treat extern statics just like statics in the "const pointer to static" representation" #67630

pnkfelix (Jan 09 2020 at 15:13, on Zulip):

this may need to wait on T-lang ?

pnkfelix (Jan 09 2020 at 15:14, on Zulip):

but we can at least let people voice opinions here as well, if any

pnkfelix (Jan 09 2020 at 15:15, on Zulip):

(The lang Q, as I understand it, is what the pre-reqs for initialization are; specifically, if the extern statics must be initialized before any rust code is run, or if its just before any rust code does an access of the extern static in question)

nikomatsakis (Jan 09 2020 at 15:15, on Zulip):

I think there's a need to write a reference chapter on this

nikomatsakis (Jan 09 2020 at 15:15, on Zulip):

but I think this is restoring the older behavior

pnkfelix (Jan 09 2020 at 15:16, on Zulip):

I think there's a need to write a reference chapter on this

but that need not block beta-backport, right?

nikomatsakis (Jan 09 2020 at 15:16, on Zulip):

it sounds like @oli is working on a reference chapter in any case (link)

nikomatsakis (Jan 09 2020 at 15:16, on Zulip):

but that need not block beta-backport, right?

correct

pnkfelix (Jan 09 2020 at 15:17, on Zulip):

okay. well we can either approve beta backport now, or revisit next week since it only landed in nightly last night

pnkfelix (Jan 09 2020 at 15:17, on Zulip):

what do people think regarding those two options?

simulacrum (Jan 09 2020 at 15:18, on Zulip):

I would approve

simulacrum (Jan 09 2020 at 15:18, on Zulip):

Though I don't have much justification :)

pnkfelix (Jan 09 2020 at 15:19, on Zulip):

for reference, the regression itself was injected by PR #66587

nikomatsakis (Jan 09 2020 at 15:19, on Zulip):

I approve of beta backport

nikomatsakis (Jan 09 2020 at 15:19, on Zulip):

(just realized I had forgotten to click before)

pnkfelix (Jan 09 2020 at 15:19, on Zulip):

okay. beta-approved.

pnkfelix (Jan 09 2020 at 15:20, on Zulip):

beta-nom 3/4: " Use the correct type for static qualifs" #67621 (another deja vu case I believe)

pnkfelix (Jan 09 2020 at 15:22, on Zulip):

looks fine to me.

pnkfelix (Jan 09 2020 at 15:23, on Zulip):

beta-accepted

pnkfelix (Jan 09 2020 at 15:24, on Zulip):

beta-nom 4/4: "Don't suppress move errors for union fields" #67314

pnkfelix (Jan 09 2020 at 15:25, on Zulip):

looks fine, beta-accepted

pnkfelix (Jan 09 2020 at 15:26, on Zulip):

next up, stable nominations

pnkfelix (Jan 09 2020 at 15:26, on Zulip):

just one stable-nom: "Do not ICE on lifetime error involving closures" #67687

pnkfelix (Jan 09 2020 at 15:27, on Zulip):

there was perhaps some light debate last week about whether this might be too risky for a stable backport

pnkfelix (Jan 09 2020 at 15:27, on Zulip):

but that "debate" may have solely come from me talking to myself

pnkfelix (Jan 09 2020 at 15:28, on Zulip):

(I think the people present convinced me that the methods being called here should not e.g. inject new ICEs...)

nikomatsakis (Jan 09 2020 at 15:29, on Zulip):

I think it would only potentially inject an ICE in a case where it already ICEs?

nikomatsakis (Jan 09 2020 at 15:29, on Zulip):

though I have to double check that

pnkfelix (Jan 09 2020 at 15:29, on Zulip):

yeah I think that's what I may have meant above. or something.

nikomatsakis (Jan 09 2020 at 15:29, on Zulip):

i.e., I presume the ICE is because name unwraps an Option, and the new code only runs if the opton was None

nikomatsakis (Jan 09 2020 at 15:30, on Zulip):

so it seems like it's not making anything any worse

pnkfelix (Jan 09 2020 at 15:30, on Zulip):

sure. okay lets go for it.

pnkfelix (Jan 09 2020 at 15:30, on Zulip):

stable-accepted.

pnkfelix (Jan 09 2020 at 15:31, on Zulip):

okay, lets look over the stable-to-beta regressions

pnkfelix (Jan 09 2020 at 15:31, on Zulip):

https://github.com/rust-lang/rust/labels/regression-from-stable-to-beta

pnkfelix (Jan 09 2020 at 15:31, on Zulip):

beta-regr: "ICE: index out of bounds: the len is 0 but the index is 0" #67945

pnkfelix (Jan 09 2020 at 15:32, on Zulip):

@davidtwco you were looking into this; do we know what PR injected this ?

nikomatsakis (Jan 09 2020 at 15:32, on Zulip):

hmm

nikomatsakis (Jan 09 2020 at 15:33, on Zulip):

I remember there were some recent PRs tinkering with this setup

pnkfelix (Jan 09 2020 at 15:33, on Zulip):

in particular

pnkfelix (Jan 09 2020 at 15:33, on Zulip):

i'm not sure if all of the reductions provided by @centril are equal examples of the regression here.

pnkfelix (Jan 09 2020 at 15:34, on Zulip):

oh and the original code (in the description)... does not get accepted anyway on stable ... ?

pnkfelix (Jan 09 2020 at 15:34, on Zulip):

that to me seems like an important detail in terms of prioritization

nikomatsakis (Jan 09 2020 at 15:34, on Zulip):

I Was wondering about that

nikomatsakis (Jan 09 2020 at 15:35, on Zulip):

this could be tricky to fix without "fixing things all the way"

nikomatsakis (Jan 09 2020 at 15:35, on Zulip):

(but I'm not sure, maybe we can induce a more graceful fail)

pnkfelix (Jan 09 2020 at 15:35, on Zulip):

What do people think: Despite this being a regression, is it indeed P-high ? Or should we reclassify as P-medium ?

nikomatsakis (Jan 09 2020 at 15:35, on Zulip):

oh and the original code (in the description)... does not get accepted anyway on stable ... ?

I'm not sure if some of the reduced ones would?

pnkfelix (Jan 09 2020 at 15:36, on Zulip):

a more graceful fall would be nice. But I'm also sort of dreading going through the set of P-high issues (a task I keep putting off...)

nikomatsakis (Jan 09 2020 at 15:36, on Zulip):

I'm going to guess they would not

pnkfelix (Jan 09 2020 at 15:36, on Zulip):

oh and the original code (in the description)... does not get accepted anyway on stable ... ?

I'm not sure if some of the reduced ones would?

As in, you think they might be accepted? Or you're asserting they wouldn't either?

pnkfelix (Jan 09 2020 at 15:37, on Zulip):

they're all rejected for various reasons

nikomatsakis (Jan 09 2020 at 15:37, on Zulip):

I have yet to make an example that gets accepted on stable; they either error or ICE in a later phase

nikomatsakis (Jan 09 2020 at 15:37, on Zulip):

this code is definitely "wack" on stable also

pnkfelix (Jan 09 2020 at 15:37, on Zulip):

I'm personally tempted to reclassify at P-medium. Anyone want to object now?

nikomatsakis (Jan 09 2020 at 15:37, on Zulip):

specifically, trying to work with type parameters inside of constants

nikomatsakis (Jan 09 2020 at 15:37, on Zulip):

I feel ok about that

mw (Jan 09 2020 at 15:37, on Zulip):

how far are we away from a proper fix?

mw (Jan 09 2020 at 15:38, on Zulip):

i.e. is this something that will be solved by something that is already being worked on?

nikomatsakis (Jan 09 2020 at 15:38, on Zulip):

Not especially close, but we're working on it

nikomatsakis (Jan 09 2020 at 15:38, on Zulip):

The main reason I'm ok with it is that the code doesn't work correctly on stable in any sense

nikomatsakis (Jan 09 2020 at 15:38, on Zulip):

it may not ICE but it gives non-sense errors

nikomatsakis (Jan 09 2020 at 15:38, on Zulip):

and if it doesn't, then I get ICEs :)

nikomatsakis (Jan 09 2020 at 15:38, on Zulip):
use std::marker::PhantomData;

use std::mem::{self, MaybeUninit};

struct Bug<S> {
    A: [(); {
        let x: Option<Box<S>> = None;
        0
    }],
}

e.g., this ICEs on stable

nikomatsakis (Jan 09 2020 at 15:39, on Zulip):

whereas Option<S> gives an error that S: Sized is not known (but it is)

pnkfelix (Jan 09 2020 at 15:39, on Zulip):

okay lets keep moving

mw (Jan 09 2020 at 15:39, on Zulip):

ok

pnkfelix (Jan 09 2020 at 15:39, on Zulip):

beta regression: "not Send due to await retainment" #67611

pnkfelix (Jan 09 2020 at 15:39, on Zulip):

oh dear there's a wall of text at the end from @Matthew Jasper

Matthew Jasper (Jan 09 2020 at 15:40, on Zulip):

Sorry?

pnkfelix (Jan 09 2020 at 15:40, on Zulip):

no I just meant that I cannot summarize status readily

pnkfelix (Jan 09 2020 at 15:40, on Zulip):

I didn't mean to offend, sorry

pnkfelix (Jan 09 2020 at 15:40, on Zulip):

@Matthew Jasper do you have thoughts on where we should go with #67611, and how we should prioritize resolving it?

mw (Jan 09 2020 at 15:41, on Zulip):

seems like the best sort of "wall of text" there can be :)

pnkfelix (Jan 09 2020 at 15:41, on Zulip):

I'm specifically interested @Matthew Jasper in your idaas about leveraging MIR internal

nikomatsakis (Jan 09 2020 at 15:41, on Zulip):

ah I've been meaning to catch up on this

pnkfelix (Jan 09 2020 at 15:41, on Zulip):

but its possible we should move this to a parallel topic for discussion after this meeting .. ?

pnkfelix (Jan 09 2020 at 15:42, on Zulip):

The important thing to note is that progress has been made and hopefully will continue to be made ... ?

Matthew Jasper (Jan 09 2020 at 15:43, on Zulip):

If we think auto-traits are perma-unstable, then I think internal is fine. Otherwise it probably needs some discussion on what guarantees that they make for auto traits.

pnkfelix (Jan 09 2020 at 15:43, on Zulip):

(and also, I can independently add the patch I linked in the issue to at least fix the crate that broke, so that we don't risk that particular narrow downstream effect...)

nikomatsakis (Jan 09 2020 at 15:43, on Zulip):

If we think auto-traits are perma-unstable, then I think internal is fine. Otherwise it probably needs some discussion on what guarantees that they make for auto traits.

wait what:)

nikomatsakis (Jan 09 2020 at 15:44, on Zulip):

(it's ok, let's not dig in too much here)

nikomatsakis (Jan 09 2020 at 15:44, on Zulip):

but I'd like to follow up

nikomatsakis (Jan 09 2020 at 15:44, on Zulip):

might be good to also talk over again the ideas how to get a more precise handling of auto traits in generators (warning: hard)

pnkfelix (Jan 09 2020 at 15:44, on Zulip):

Lets make a parallel topic, hold on

pnkfelix (Jan 09 2020 at 15:45, on Zulip):

fork: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/solutions.20to.20not.20Send.20due.20to.20await.20retainment.20.20.2367611/near/185223712

pnkfelix (Jan 09 2020 at 15:45, on Zulip):

okay, lets keep moving then. #67611 can stay P-high

pnkfelix (Jan 09 2020 at 15:46, on Zulip):

beta-regression "const_if_match ICE" #67405 is P-medium so I will skip it

pnkfelix (Jan 09 2020 at 15:46, on Zulip):

beta-regression: "Usage of errorneous constant can be omitted on nightly and beta" #67083

pnkfelix (Jan 09 2020 at 15:46, on Zulip):

@oli is there movement here?

pnkfelix (Jan 09 2020 at 15:47, on Zulip):

ah this is fixed by #67134

pnkfelix (Jan 09 2020 at 15:47, on Zulip):

which we just approved, right? Sorry for noise.

oli (Jan 09 2020 at 15:47, on Zulip):

I think we papered over them

davidtwco (Jan 09 2020 at 15:47, on Zulip):

davidtwco you were looking into this; do we know what PR injected this ?

sorry, just arrived, this was regarding #67945, I didn't bisect or anything like that.

pnkfelix (Jan 09 2020 at 15:48, on Zulip):

last beta-regression: "Regression in helpful compiler error message when working with lifetimes" #66406

pnkfelix (Jan 09 2020 at 15:48, on Zulip):

oh that's P-medium too, so we can skip

pnkfelix (Jan 09 2020 at 15:49, on Zulip):

(I think its probably good to revisit P-medium beta-regressions, to keep ourselves honest. But if others think they should be omitted entirely from the list each week, say so and we can discuss.)

pnkfelix (Jan 09 2020 at 15:49, on Zulip):

so, we have 11 minutes left in the meeting

pnkfelix (Jan 09 2020 at 15:49, on Zulip):

I don't think we can do both a walk through the nightly regressions and also visit I-nominated issues

pnkfelix (Jan 09 2020 at 15:50, on Zulip):

I'm somewhat tempted to skip the nightly regressions for this week and go straight to nominations. Does anyone object?

pnkfelix (Jan 09 2020 at 15:51, on Zulip):

here are all the nominated issues

nikomatsakis (Jan 09 2020 at 15:51, on Zulip):

(seems ok)

pnkfelix (Jan 09 2020 at 15:51, on Zulip):

nom issue: "SIGSEGV in LLVM when linking to extern "Rust" { fn main(); }" #67946

pnkfelix (Jan 09 2020 at 15:52, on Zulip):

I left this nominated because I wanted it to get attention. It seems weird. :)

pnkfelix (Jan 09 2020 at 15:52, on Zulip):

now that i've done that, I'm removing the nomination.

pnkfelix (Jan 09 2020 at 15:52, on Zulip):

nom issue: "Change opt-level from 2 back to 3" #67878

mati865 (Jan 09 2020 at 15:53, on Zulip):

#67878 is waiting on the crater.

pnkfelix (Jan 09 2020 at 15:53, on Zulip):

so this is interesting. The opt-levels here, can someone clarify, does this affect both rustc and stdlib ... and LLVM build ?

simulacrum (Jan 09 2020 at 15:53, on Zulip):

I don't recall

simulacrum (Jan 09 2020 at 15:54, on Zulip):

Mostly not llvm though

pnkfelix (Jan 09 2020 at 15:54, on Zulip):

@mati865 ah you perhaps figure discussion there can wait until crater results are done?

simulacrum (Jan 09 2020 at 15:54, on Zulip):

We, probably

simulacrum (Jan 09 2020 at 15:54, on Zulip):

Yeah we can wait

pnkfelix (Jan 09 2020 at 15:54, on Zulip):

Mostly not llvm though

I mentioned LLVM because of this comment in source

pnkfelix (Jan 09 2020 at 15:54, on Zulip):

okay lets wait for crater

pnkfelix (Jan 09 2020 at 15:55, on Zulip):

nom issue: "Fix some of the rustfmt fallout in Miri" #67833

pnkfelix (Jan 09 2020 at 15:56, on Zulip):

so the issue here is that @RalfJ did not like what rustfmt did to the miri source, and has added #[rustfmt::skip] attributes to the relevant match blocks to sidestep it

pnkfelix (Jan 09 2020 at 15:57, on Zulip):

I think I like @simulacrum 's suggestion: we can land the skips, but they should have an associated rustfmt issue so that the developers of that tool can try to address the problem at hand more directly. (and potentially expose a config setting to let us tweak its handling here.)

nikomatsakis (Jan 09 2020 at 15:57, on Zulip):

I'm ok with that, but I agree with the general principle that mostly we should just live with rustfmt :P

nikomatsakis (Jan 09 2020 at 15:58, on Zulip):

but I think that this adds a "correct" amount of friction

pnkfelix (Jan 09 2020 at 15:58, on Zulip):

well hopefully the pain of filing an issue will be enough to push people away from that avenue?

nikomatsakis (Jan 09 2020 at 15:58, on Zulip):

i.e., if you care strongly enough to open an issue on rustfmt repo...

pnkfelix (Jan 09 2020 at 15:58, on Zulip):

right, exactly.

nikomatsakis (Jan 09 2020 at 15:58, on Zulip):

but also, if they decide in the end not to change it..?

pnkfelix (Jan 09 2020 at 15:58, on Zulip):

Well so be it

nikomatsakis (Jan 09 2020 at 15:58, on Zulip):

I tend to think in that case we remove the rustfmt skip eventually, but let's see

pnkfelix (Jan 09 2020 at 15:59, on Zulip):

Maybe that's a debate to be had on a case by case basis...

pnkfelix (Jan 09 2020 at 15:59, on Zulip):

or at least, the debate about how to go about removing the rustfmt::skip can be had on each issue that's filed

pnkfelix (Jan 09 2020 at 16:00, on Zulip):

(that will give people like me a chance to convince everyone else that let val; ... val = expr; aint so bad...)

pnkfelix (Jan 09 2020 at 16:00, on Zulip):

oh no out of time

pnkfelix (Jan 09 2020 at 16:00, on Zulip):

um

pnkfelix (Jan 09 2020 at 16:00, on Zulip):

okay

pnkfelix (Jan 09 2020 at 16:00, on Zulip):

@T-compiler/WG-meta anything to report?

nikomatsakis (Jan 09 2020 at 16:00, on Zulip):

No -- we've not done much :)

nikomatsakis (Jan 09 2020 at 16:01, on Zulip):

but I think we plan to start working on setting up a bisection ICE-breaker

pnkfelix (Jan 09 2020 at 16:01, on Zulip):

done!

nikomatsakis (Jan 09 2020 at 16:01, on Zulip):

and/or the major change process

pnkfelix (Jan 09 2020 at 16:01, on Zulip):

@WG-mir-opt namely @oli , anything to report?

nikomatsakis (Jan 09 2020 at 16:01, on Zulip):

"a lot has been happening"

oli (Jan 09 2020 at 16:01, on Zulip):

oh, I did, but I didn't save and lost it

pnkfelix (Jan 09 2020 at 16:01, on Zulip):

and/or the major change process

(ah, so then there's stuff to report, heh.)

nikomatsakis (Jan 09 2020 at 16:01, on Zulip):

we had some discussions about what MIR 2.0 would look like... some notes and thoughts here

oli (Jan 09 2020 at 16:02, on Zulip):

#67000 will finally make mir::Place not be able to point to statics or promoteds anymore but just locals (pending a 60% regression on the const eval stress tests)

oli (Jan 09 2020 at 16:03, on Zulip):

#67662 and #67333 get us closer to bootstrapping rustc with mir inlining

oli (Jan 09 2020 at 16:04, on Zulip):

const prop can now propagate into the rhs of assignments to user defined variables: #67130

oli (Jan 09 2020 at 16:04, on Zulip):

and a bunch of peephole optimizations

oli (Jan 09 2020 at 16:05, on Zulip):

I lost track of all of them

pnkfelix (Jan 09 2020 at 16:05, on Zulip):

okay sounds great

oli (Jan 09 2020 at 16:05, on Zulip):

oh and we had a mir 2.0 meeting, if anyone wants to read up: https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting/near/185014270

pnkfelix (Jan 09 2020 at 16:05, on Zulip):

/me has to run

pnkfelix (Jan 09 2020 at 16:05, on Zulip):

Bye everyone in @T-compiler/meeting ; thanks for attending!!!

lqd (Jan 09 2020 at 16:15, on Zulip):

beta-regr: "ICE: index out of bounds: the len is 0 but the index is 0" #67945

@pnkfelix this started ICE-ing in #66141 but it's a rollup

Last update: May 26 2020 at 11:10UTC