Skip to content

Fix or prevent projections of associated types in impl headers #20637

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

Closed
nikomatsakis opened this issue Jan 6, 2015 · 2 comments
Closed

Fix or prevent projections of associated types in impl headers #20637

nikomatsakis opened this issue Jan 6, 2015 · 2 comments
Milestone

Comments

@nikomatsakis
Copy link
Contributor

Right now we permit associated type projections in the impl trait-ref and self-type:

impl<T:Foo> Foo<T::Baz> for T

But this isn't fully supported. For example, coherence doesn't consider such types (#20624) and I think there will be other problems due to inadequate normalization. I'm not so worried about the bugs per se, but we should decide if we think we will support this for 1.0 or not. If not, we should either just prevent projections in those positions for now.

At first I thought this was really hard to support, but now I am not so sure. It might just be a matter of inserting normalizations into a few places.

@nikomatsakis nikomatsakis added this to the 1.0 alpha milestone Jan 6, 2015
@nikomatsakis
Copy link
Contributor Author

Nominating and adding to alpha milestone.

@nikomatsakis
Copy link
Contributor Author

I decided to just fix them (and did so, in PR #20757)

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

No branches or pull requests

1 participant