Stream: wg-traits

Topic: rust-lang/chalk#230


Sunjay Varma (Jun 08 2019 at 17:29, on Zulip):

@nikomatsakis PR for you: https://github.com/rust-lang/chalk/pull/230 :tada:

Sunjay Varma (Jun 08 2019 at 17:30, on Zulip):

This should not be merged right away

Sunjay Varma (Jun 08 2019 at 17:30, on Zulip):

I left an unimplemented in there for something I'm not sure how to implement fully

Sunjay Varma (Jun 08 2019 at 17:30, on Zulip):

See the PR description for more info

Sunjay Varma (Jun 08 2019 at 17:30, on Zulip):

This just adds the parsing and lowering to IR for RevealMode and Overrides.

Sunjay Varma (Jun 08 2019 at 17:30, on Zulip):

Going to add the lowering for default type afterwards

Sunjay Varma (Jun 08 2019 at 17:31, on Zulip):

Let me know what you think! :smiley:

nikomatsakis (Jun 10 2019 at 18:04, on Zulip):

ooh, nice

nikomatsakis (Jun 24 2019 at 18:00, on Zulip):

@Sunjay Varma finally read through your PR. I left one immediate comment, but it obviously just opens up the next question

Sunjay Varma (Jun 24 2019 at 18:01, on Zulip):

Thanks! I will take a look and try to finish more this weekend. Maybe we can discuss it more at some point if you think that's necessary?

nikomatsakis (Jun 24 2019 at 18:02, on Zulip):

Yep. The real question is basically when to generate the Overrides rules

nikomatsakis (Jun 24 2019 at 18:02, on Zulip):

I have to review the code that exists, I guess

nikomatsakis (Jun 24 2019 at 18:02, on Zulip):

this is basically the question I was hoping to "semi-sidestep" --

nikomatsakis (Jun 24 2019 at 18:03, on Zulip):

by which I mean that there is a lot of interesting work to do if we just assume we know which impl overrides another

nikomatsakis (Jun 24 2019 at 18:03, on Zulip):

and then even more interesting work to do figuring out which impl overides which, and when that is legal =)

Sunjay Varma (Jun 24 2019 at 18:03, on Zulip):

Oh dear okay. Maybe it would be better to leave it unimplemented and then move on to the next step?

nikomatsakis (Jun 24 2019 at 18:03, on Zulip):

that's not quite what I mean

nikomatsakis (Jun 24 2019 at 18:03, on Zulip):

what I mean is: it might make sense to consider adding some kind of annotations

nikomatsakis (Jun 24 2019 at 18:04, on Zulip):

but maybe we can also build on the code that exists

nikomatsakis (Jun 24 2019 at 18:04, on Zulip):

even if it's imperfect

nikomatsakis (Jun 24 2019 at 18:04, on Zulip):

there is some code for building a 'specialization forest'

nikomatsakis (Jun 24 2019 at 18:04, on Zulip):

i.e., relating impls to one another

nikomatsakis (Jun 24 2019 at 18:05, on Zulip):

anyway the suggestion I made is (I think) the right thing to replace the unimplemented! call with, it's just that the fn I suggested calling isn't yet doing what it will need to do

Sunjay Varma (Jun 24 2019 at 18:05, on Zulip):

right. I think I get what you're saying

Sunjay Varma (Jun 24 2019 at 18:06, on Zulip):

Isn't that the point though? We're just adding the syntax for overrides, and then we're going to work on generating it next

Sunjay Varma (Jun 24 2019 at 18:06, on Zulip):

(sorry I'm also just refreshing my cache about this since I worked on it two weeks ago :sweat_smile:)

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

Isn't that the point though? We're just adding the syntax for overrides, and then we're going to work on generating it next

yes

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

I guess for this PR it's fine either way

Sunjay Varma (Jun 24 2019 at 18:09, on Zulip):

Okay so the current PR is fine as it is then. I'll add that unimplemented part this weekend based on your comment. Then we can work on generating Overrides next. Is that correct?

nikomatsakis (Jun 24 2019 at 18:09, on Zulip):

Sounds right. I'm looking over the existing coherence code

nikomatsakis (Jun 24 2019 at 18:10, on Zulip):

In general, I think we need to figure out the "query setup" here I guess -- the current structure doesn't quite feel right.

nikomatsakis (Jun 24 2019 at 18:10, on Zulip):

but the basic logic of constructing the spec forest seems reasonable

nikomatsakis (Jun 24 2019 at 18:11, on Zulip):

I thnk the idea of scheduling some time to talk this out is prob a good ide

Sunjay Varma (Jun 24 2019 at 18:13, on Zulip):

Thursday morning (EST) next week (July 4th)?

Sunjay Varma (Jun 24 2019 at 18:13, on Zulip):

Oh wait that's probably a holiday for you?

nikomatsakis (Jun 24 2019 at 18:14, on Zulip):

It is =)

nikomatsakis (Jun 24 2019 at 18:14, on Zulip):

I could perhaps chat a bit in the 2:30-3:30 slot we have reserved (i.e., now, or very shortly)

nikomatsakis (Jun 24 2019 at 18:15, on Zulip):

I've not done any prep obviously

nikomatsakis (Jun 24 2019 at 18:15, on Zulip):

We could also plan for next week at that time, I think

Sunjay Varma (Jun 24 2019 at 18:15, on Zulip):

Yes that works

Sunjay Varma (Jun 24 2019 at 18:16, on Zulip):

Jul 1 at 2:30 pm

Sunjay Varma (Jun 24 2019 at 18:16, on Zulip):

(EST)

nikomatsakis (Jun 24 2019 at 18:16, on Zulip):

OK, I'll create a particular event so I don't forget :)

Sunjay Varma (Jun 24 2019 at 18:18, on Zulip):

Can you invite me to that as well?

nikomatsakis (Jun 24 2019 at 18:23, on Zulip):

yep

Last update: Nov 12 2019 at 16:30UTC