Check uses of Self in impls in the compiler rather than during expansion#23998
Check uses of Self in impls in the compiler rather than during expansion#23998bors merged 2 commits intorust-lang:masterfrom
Self in impls in the compiler rather than during expansion#23998Conversation
|
Seems good. r+ if the supertrait thing is resolved (let me know if you think I'm off base...). |
|
@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.
Closes #23909 r? @nikomatsakis (or anyone else, really)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
(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.)
There was a problem hiding this comment.
(well, my attempt to quickly hack this in was met with failure: internal compiler error: self type has not been fully resolved)
Closes #23909
r? @nikomatsakis (or anyone else, really)