Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check uses of Self in impls in the compiler rather than during expansion #23998

Merged
merged 2 commits into from
Apr 8, 2015

Conversation

nrc
Copy link
Member

@nrc nrc commented Apr 3, 2015

Closes #23909

r? @nikomatsakis (or anyone else, really)

@nikomatsakis
Copy link
Contributor

Seems good. r+ if the supertrait thing is resolved (let me know if you think I'm off base...).

@nrc
Copy link
Member Author

nrc commented Apr 7, 2015

@nikomatsakis ping for review of the second commit (assoc types in super traits). There are big enough changes there that I'd like you to take another look. (The error result type is fixed in the first commit).

And fix a bug with type param visibility though the Self rib.
@nikomatsakis
Copy link
Contributor

@bors r+ 63b36ea

bors added a commit that referenced this pull request Apr 8, 2015
@bors
Copy link
Contributor

bors commented Apr 8, 2015

⌛ Testing commit 63b36ea with merge 926f38e...

@@ -2077,40 +2086,42 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
this.visit_generics(generics);
Copy link
Member

Choose a reason for hiding this comment

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

would it possibly make sense to first do the this.with_current_self_type(self_type, |this| { ... }) and only do the this.visit_generics(generics); within the { ... }? It seems like it might fix #24944

Copy link
Member

Choose a reason for hiding this comment

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

(alternatively, maybe we should first visit the generics.ty_params outside of the with_current_self_type, and then just move the visit of the generics.where_clause.predicates into the inside of with_current_self_type.)

Copy link
Member

Choose a reason for hiding this comment

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

(well, my attempt to quickly hack this in was met with failure: internal compiler error: self type has not been fully resolved)

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.

Reimplement Self in impls in the compiler
4 participants