Stream: t-compiler/wg-rfc-2229

Topic: sync 2019-05-07


blitzerr (May 07 2019 at 17:33, on Zulip):

Hi @WG-rfc-2229 we will begin here in about 27 minutes. :wave:

ange (May 07 2019 at 17:44, on Zulip):

Thanks for the heads up! Might miss the first 15' or so

blitzerr (May 07 2019 at 18:00, on Zulip):

Hi @WG-rfc-2229

nikomatsakis (May 07 2019 at 18:01, on Zulip):

I've done nothing :P

nikomatsakis (May 07 2019 at 18:01, on Zulip):

Well, that's not entirely true, I left a review for @csmoe as I recall

nikomatsakis (May 07 2019 at 18:01, on Zulip):

but maybe that was last week

blitzerr (May 07 2019 at 18:01, on Zulip):

Alright, I think the meeting ends here :rolling_on_the_floor_laughing:

nikomatsakis (May 07 2019 at 18:01, on Zulip):

haha I thnk the question @blitzerr is what it will take to land your PR :)

nikomatsakis (May 07 2019 at 18:02, on Zulip):

(well, it may well be that the meeting doesn't last that long :)

blitzerr (May 07 2019 at 18:02, on Zulip):

You approved @csmoe CR, I saw.

nikomatsakis (May 07 2019 at 18:02, on Zulip):

currently I see ~1000 test failures :)

nikomatsakis (May 07 2019 at 18:03, on Zulip):

well, stderr files with diffs

blitzerr (May 07 2019 at 18:03, on Zulip):

Right, So I can take some of what you were trying to do with the PR.

nikomatsakis (May 07 2019 at 18:03, on Zulip):

but I think they are all similar problems

blitzerr (May 07 2019 at 18:03, on Zulip):

currently I see ~1000 test failures :slight_smile:

Wow !

nikomatsakis (May 07 2019 at 18:03, on Zulip):

some of them are actually .. likely expected

nikomatsakis (May 07 2019 at 18:04, on Zulip):

there was some change to how closures wind up printing out

nikomatsakis (May 07 2019 at 18:04, on Zulip):

that is one big chunk

blitzerr (May 07 2019 at 18:04, on Zulip):

When I was looking at it, it was around 100, and now 1000.

blitzerr (May 07 2019 at 18:04, on Zulip):

Hopefully, it will a small fix somewhere and all just go away

nikomatsakis (May 07 2019 at 18:05, on Zulip):

e.g., I get stuff like

modified   src/test/ui/block-result/issue-20862.stderr
@@ -7,7 +7,7 @@ LL |     |y| x + y
    |     ^^^^^^^^^ expected (), found closure
    |
    = note: expected type `()`
-              found type `[closure@$DIR/issue-20862.rs:2:5: 2:14 x:_]`
+              found type `[closure@$DIR/issue-20862.rs:2:5: 2:14]`

 error[E0618]: expected function, found `()`
   --> $DIR/issue-20862.rs:7:13
nikomatsakis (May 07 2019 at 18:05, on Zulip):

actually the vast majority I think are of this kind

nikomatsakis (May 07 2019 at 18:05, on Zulip):

so presumably part of the changes to ppaux

nikomatsakis (May 07 2019 at 18:05, on Zulip):

there are some others

nikomatsakis (May 07 2019 at 18:05, on Zulip):
modified   src/test/ui/issues/issue-40827.stderr
@@ -4,10 +4,8 @@ error[E0277]: `std::rc::Rc<Foo>` cannot be sent between threads safely
 LL |     f(Foo(Arc::new(Bar::B(None))));
    |     ^ `std::rc::Rc<Foo>` cannot be sent between threads safely
    |
-   = help: within `Bar`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<Foo>`
-   = note: required because it appears within the type `Bar`
+   = help: the trait `std::marker::Send` is not implemented for `std::rc::Rc<Foo>`
    = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<Bar>`
-   = note: required because it appears within the type `Foo`
 note: required by `f`
   --> $DIR/issue-40827.rs:11:1
    |
@@ -20,10 +18,8 @@ error[E0277]: `std::rc::Rc<Foo>` cannot be shared between threads safely
 LL |     f(Foo(Arc::new(Bar::B(None))));
    |     ^ `std::rc::Rc<Foo>` cannot be shared between threads safely
    |
-   = help: within `Bar`, the trait `std::marker::Sync` is not implemented for `std::rc::Rc<Foo>`
-   = note: required because it appears within the type `Bar`
+   = help: the trait `std::marker::Sync` is not implemented for `std::rc::Rc<Foo>`
    = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<Bar>`
-   = note: required because it appears within the type `Foo`
 note: required by `f`
   --> $DIR/issue-40827.rs:11:1
    |
nikomatsakis (May 07 2019 at 18:06, on Zulip):

so I guess the real question is, @blitzerr, you mentioned you were busy, do you expect to have any time to investigate this sort of thing?

blitzerr (May 07 2019 at 18:06, on Zulip):

Ya, the ppaux change was something you were worried about

nikomatsakis (May 07 2019 at 18:06, on Zulip):

I don't quite get why it changed

nikomatsakis (May 07 2019 at 18:06, on Zulip):

Oh, I guess I know why

nikomatsakis (May 07 2019 at 18:07, on Zulip):

this...seems...fixable

nikomatsakis (May 07 2019 at 18:07, on Zulip):

the problem is this line

blitzerr (May 07 2019 at 18:07, on Zulip):

I can take a look. I should be able to find some time now.

nikomatsakis (May 07 2019 at 18:07, on Zulip):
                            for (freevar, upvar_ty) in freevars.iter().zip(upvar_tys) {
nikomatsakis (May 07 2019 at 18:07, on Zulip):

in particular, before a certain stage in inference, upvar_tys is &[]

nikomatsakis (May 07 2019 at 18:07, on Zulip):

and hence the zip ends early

nikomatsakis (May 07 2019 at 18:07, on Zulip):

but before we used to iterate over the freevars

nikomatsakis (May 07 2019 at 18:07, on Zulip):

eventually, this code will have to change

blitzerr (May 07 2019 at 18:08, on Zulip):

Now sure, I will get much done and I understand the provenance of the errors in completeness.

nikomatsakis (May 07 2019 at 18:08, on Zulip):

i.e., before we finish inferring, we won't really know what is captured

blitzerr (May 07 2019 at 18:08, on Zulip):

I see

nikomatsakis (May 07 2019 at 18:08, on Zulip):

but I would wait to make that change

nikomatsakis (May 07 2019 at 18:08, on Zulip):

so I think what I would do is that we always iterate over the freevars

nikomatsakis (May 07 2019 at 18:08, on Zulip):

something like this

blitzerr (May 07 2019 at 18:09, on Zulip):

That makes sense.

nikomatsakis (May 07 2019 at 18:09, on Zulip):
for (index, freevar) in freevars.iter().enumerate() {
    if let Some(upvar_ty) = upvar_tys.get(index) {
        ..
    } else {
        print!("{}: _"); // hacky
    }
}
blitzerr (May 07 2019 at 18:09, on Zulip):

We thought we somehow got lucky, where upvars were already inferred where we needed to make change, seems not quite

nikomatsakis (May 07 2019 at 18:09, on Zulip):

yeah, that's at least a big chunk of the errors

nikomatsakis (May 07 2019 at 18:10, on Zulip):

not all of them

blitzerr (May 07 2019 at 18:10, on Zulip):

Cool. Let me get to that.

blitzerr (May 07 2019 at 18:10, on Zulip):

I will send out a revision.

blitzerr (May 07 2019 at 18:11, on Zulip):

Your latest changes are already in my branch, right @nikomatsakis ?

blitzerr (May 07 2019 at 18:12, on Zulip):

x:_ was missing so print!("{}: _", <freevar>); // hacky. ?

nikomatsakis (May 07 2019 at 18:13, on Zulip):

Your latest changes are already in my branch, right nikomatsakis ?

yes

blitzerr (May 07 2019 at 18:13, on Zulip):

cool, sounds good.

nikomatsakis (May 07 2019 at 18:13, on Zulip):

x:_ was missing so print!("{}: _", <freevar>); // hacky. ?

yeah, the reason I said "hacky" is that

nikomatsakis (May 07 2019 at 18:13, on Zulip):

presently for an inference variable

nikomatsakis (May 07 2019 at 18:13, on Zulip):

we print _

nikomatsakis (May 07 2019 at 18:13, on Zulip):

and I'm kind of hard-coding that here

nikomatsakis (May 07 2019 at 18:13, on Zulip):

but oh well

nikomatsakis (May 07 2019 at 18:14, on Zulip):

I guess you could gin up a fake TyInfer and print that :)

blitzerr (May 07 2019 at 18:14, on Zulip):

I can see the hack :slight_smile:

nikomatsakis (May 07 2019 at 18:14, on Zulip):

actually

nikomatsakis (May 07 2019 at 18:14, on Zulip):

you could print the "upvar_tuple_ty"

blitzerr (May 07 2019 at 18:14, on Zulip):

When people see this line of code, they wouldn't like me anymore :D

nikomatsakis (May 07 2019 at 18:14, on Zulip):

which will be some inference variable :)

nikomatsakis (May 07 2019 at 18:14, on Zulip):

though man that would be confusing

nikomatsakis (May 07 2019 at 18:14, on Zulip):

when you run with -Zverbose

nikomatsakis (May 07 2019 at 18:14, on Zulip):

(which prints the identify of inference variables)

nikomatsakis (May 07 2019 at 18:15, on Zulip):

I guess I'd just run with _

nikomatsakis (May 07 2019 at 18:15, on Zulip):

it is a hack, but as we said, we're probably going to have to change this format anyway

blitzerr (May 07 2019 at 18:15, on Zulip):

Okay, so we freeze the print!("{}: _") hack.

ange (May 07 2019 at 18:15, on Zulip):

(which prints the identify of inference variables)

oh wish I'd known that before

blitzerr (May 07 2019 at 18:16, on Zulip):

Got it

blitzerr (May 07 2019 at 18:16, on Zulip):

Ya -Zverbose sounds really useful.

blitzerr (May 07 2019 at 18:17, on Zulip):

The compiler is full of these great hooks that I don't even know

ange (May 07 2019 at 18:17, on Zulip):

fwiw I've also done nothing and not sure what there is to do re: computing the paths, as that seems to be dependent on what comes out of some design meeting at some point in the future, which is fair

blitzerr (May 07 2019 at 18:18, on Zulip):

@ange You said that your time would be very limited starting May, how does it look ?

ange (May 07 2019 at 18:18, on Zulip):

fwiw I might have some time next week, if there's anything I can do to help with collecting notes for future discussions

ange (May 07 2019 at 18:19, on Zulip):

ange You said that your time would be very limited starting May, how does it look ?

pretty limited :-)

blitzerr (May 07 2019 at 18:19, on Zulip):

:smiley:

blitzerr (May 07 2019 at 18:20, on Zulip):

Fair enough. Whatever works out with your limited time.

blitzerr (May 07 2019 at 18:22, on Zulip):

@nikomatsakis Anything more we have for today ?

nikomatsakis (May 07 2019 at 18:23, on Zulip):

Heh, @ange, fwiw, I think that this particular point int he design may indeed block for a semester or so :)

nikomatsakis (May 07 2019 at 18:23, on Zulip):

Anything more we have for today ?

I don't have anything :)

nikomatsakis (May 07 2019 at 18:23, on Zulip):

In particular, I'm feeling spread way too thin, and looking for ways to "focus" on one thing at a time :)

nikomatsakis (May 07 2019 at 18:23, on Zulip):

So I'm happy to defer talk of upvars a bit, though I do want to see this RFC advance (I think it's an important ergnomic initiative)

nikomatsakis (May 07 2019 at 18:24, on Zulip):

but at the moment we seem to have some concrete steps still before us (the freevars refactoring, the work that @blitzerr is trying to land)

blitzerr (May 07 2019 at 18:24, on Zulip):

In particular, I'm feeling spread way too thin, and looking for ways to "focus" on one thing at a time :slight_smile:

I can only imagine how leading a large OSS like rust would be like

blitzerr (May 07 2019 at 18:25, on Zulip):

I am sorry that this RFC hasn't moved as fast as we would have liked

nikomatsakis (May 07 2019 at 18:25, on Zulip):

Please do not apologize for anything :)

nikomatsakis (May 07 2019 at 18:25, on Zulip):

If anyone should be apologizing, it's me ;)

nikomatsakis (May 07 2019 at 18:26, on Zulip):

To be honest, this RFC is advancing far faster than I had expected .. I was worried it'd be deferred forever.

blitzerr (May 07 2019 at 18:28, on Zulip):

Cool. Hopefully, we would land this PR soon and then we can work on the more interesting parts. Thanks all for the contributions. Specially @nikomatsakis who probably more meetings than hours and still manages to find time to look at the test failures. :pray:

ange (May 07 2019 at 18:29, on Zulip):

Heh, ange, fwiw, I think that this particular point int he design may indeed block for a semester or so :)

@nikomatsakis that's cool! spending time on it helped me learn a bit more about rustc, looking forward to repeat the experience when the opportunity next arises (time-wise). if anything I've posted so far is ever useful to someone else, that's a nice bonus

blitzerr (May 07 2019 at 18:29, on Zulip):

So @WG-rfc-2229 I think this will be all for today. Thank you for your time all.

blitzerr (May 07 2019 at 18:31, on Zulip):

@ange can you point me to your notes. I missed them or even better add a link to this RFC roadmap, dropbox paper doc ?

ange (May 07 2019 at 18:32, on Zulip):

@blitzerr sure, though I'll probably get around to it in the weekend (or next week for sure)

blitzerr (May 07 2019 at 18:32, on Zulip):

@ange No worries at all. Get to it, when you get to it

Last update: Nov 17 2019 at 08:25UTC