Skip to content

Associated type region bounds and miscellaneous ICEs #20465

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

Merged
merged 3 commits into from
Jan 6, 2015

Conversation

nikomatsakis
Copy link
Contributor

Treat associated types the same as type parameters when it comes to region bounding. Fixes #20303.

Strictly speaking, this is a [breaking-change](if you are using
associated types). You are no longer free to wantonly violate the type
system rules by closing associated types into objects without any form
of region bound. Instead you should add region bounds like T::X : 'a, just as you would with a normal type parameter.

r? @aturon

@nikomatsakis
Copy link
Contributor Author

@aturon let me know if you don't feel qualified to review. I'm picking on you lately for some reason.

@nikomatsakis nikomatsakis changed the title Associated type region bounds Associated type region bounds and miscellaneous ICEs Jan 3, 2015
@aturon
Copy link
Member

aturon commented Jan 3, 2015

r=me after a rebase

Verified

This commit was signed with the committer’s verified signature.
haukot Dmitry Davydov
…egion bounding. Fixes rust-lang#20303.

Strictly speaking, this is a [breaking-change] (if you are using
associated types). You are no longer free to wantonly violate the type
system rules by closing associated types into objects without any form
of region bound. Instead you should add region bounds like `T::X :
'a`, just as you would with a normal type parameter.
@nikomatsakis nikomatsakis force-pushed the assoc-types-regions-20303 branch from 08c82a4 to b540f96 Compare January 5, 2015 15:15

Verified

This commit was signed with the committer’s verified signature.
haukot Dmitry Davydov
…n the other compiler passes.

Fixes rust-lang#17359.
@nikomatsakis nikomatsakis force-pushed the assoc-types-regions-20303 branch from b540f96 to 5caf847 Compare January 5, 2015 16:32
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 6, 2015
Treat associated types the same as type parameters when it comes to region bounding. Fixes rust-lang#20303.

Strictly speaking, this is a [breaking-change] (if you are using
associated types). You are no longer free to wantonly violate the type
system rules by closing associated types into objects without any form
of region bound. Instead you should add region bounds like `T::X :
'a`, just as you would with a normal type parameter.

r? @aturon
@bors bors merged commit 5caf847 into rust-lang:master Jan 6, 2015
@nikomatsakis nikomatsakis deleted the assoc-types-regions-20303 branch March 30, 2016 16:12
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.

Clarify outlives requirements on associated types
3 participants