Skip to content

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
Contributor

aturon commented Jan 3, 2015

r=me after a rebase

…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
@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