Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport builtin bounds on associated types and make them Sized by default #17921
Comments
This comment has been minimized.
This comment has been minimized.
aturon
added
the
I-nominated
label
Oct 12, 2014
This comment has been minimized.
This comment has been minimized.
|
Nominating. Associated types are planned to be un-feature-gated by 1.0, and this change is not backwards-compatible. Assuming that we keep our current rules/syntax for generics and unsized types, I think we need to take both of the suggestions in this issue to ensure consistency with the rest of the language. |
This comment has been minimized.
This comment has been minimized.
|
Agreed on both suggestions. |
This comment has been minimized.
This comment has been minimized.
|
Assigning P-backcompat-lang, 1.0. |
pnkfelix
added
P-backcompat-lang
and removed
I-nominated
labels
Oct 16, 2014
pnkfelix
added this to the 1.0 milestone
Oct 16, 2014
This comment has been minimized.
This comment has been minimized.
|
I'm sort of working on this |
nikomatsakis
changed the title
Make associated types Sized by default
Support builtin bounds on associated types and make them Sized by default
Oct 29, 2014
This comment has been minimized.
This comment has been minimized.
|
I updated the title to reflect the full work involved in this issue. I am targeting this as supporting builtin bounds like |
nikomatsakis
referenced this issue
Nov 1, 2014
Merged
Support Sized bounds for associated types #18506
bors
closed this
in
#18506
Nov 4, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kennytm commentedOct 10, 2014
(Moved from http://discuss.rust-lang.org/t/make-associated-types-sized-by-default/615)
Currently this program:
Fails to compile as:
According to RFC 59 we should be able to fix it by (currently unimplemented)
But,
Shouldn't associated types be Sized by default? As associated types are to be used to replace "output" type parameters, it is more convenient to be Sized.
If associated types are Sized by default, what should be the syntax then if we want to allow unsized associated types? The generic spelling currently suggests something like