Skip to content

Conversation

crlf0710
Copy link
Member

closes #369 . But i guess some adjustment are needed.

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'll want to look more, but first common is that I would prefer to avoid a setup like Canonical<I, T> and instead require that T: HasInterner -- do you know if there's a good reason we can't do that?

@crlf0710
Copy link
Member Author

@nikomatsakis Ok, i've rebased and reverted those changes. Ready for review again.

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on a quick scroll, this is looking good, modulo my comment below, which I suspect is more concerned with follow-up work

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next suggestion =) I'm also debating about renaming ParameterKindsWithUniverseIndex, as I noted on Zulip

@crlf0710
Copy link
Member Author

Comments addressed. Ready for review again.

fn into_binders_and_value(self) -> (Self::Binders, Self::Value) {
(self.0.binders.iter(self.1).cloned(), self.0.skip_binders())
fn into_binders_and_value(self, interner: &'a I) -> (Self::Binders, Self::Value) {
(self.binders.iter(interner).cloned(), self.skip_binders())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see, it's because we actually return an interior here -- well, this seems ok.

@nikomatsakis
Copy link
Contributor

@crlf0710 can you rebase this PR? Then I'm inclined to merge!

@crlf0710
Copy link
Member Author

@nikomatsakis Sure, done!

@nikomatsakis
Copy link
Contributor

@crlf0710 uh oh, need one more rebase :)

@crlf0710
Copy link
Member Author

@nikomatsakis Done again :)

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found one inaccurate comment. I may just push up a fix for that myself.

// different from `^1.0` in terms of what variable is being
// referenced.
write!(fmt, "<")?;
for (index, binder) in self.parameter_kinds.iter(self.interner).enumerate() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, this code doesn't seem like it's in the right place. ParameterKinds are just a list of, well, parameter kinds. They are not themselves a binder... Ah, well, I guess every time they are used, it's as part of a binder... ok, seems reasonable. 👍

@nikomatsakis nikomatsakis merged commit 557170e into rust-lang:master Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

move remaining vectors, boxes in chalk-ir into associated types on Interner
2 participants