Skip to content
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

Make {Default, From, FromIterator, One, Zero} well-formed #29266

Merged
merged 1 commit into from
Oct 25, 2015
Merged

Make {Default, From, FromIterator, One, Zero} well-formed #29266

merged 1 commit into from
Oct 25, 2015

Conversation

apasel422
Copy link
Contributor

Using these traits in an object context previously resulted in an RFC 1214 warning.

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

Using these traits in an object context previously resulted in an RFC
1214 warning.
@apasel422 apasel422 changed the title Make {Default, FromIterator, One, Zero} well-formed Make {Default, From, FromIterator, One, Zero} well-formed Oct 24, 2015
@apasel422
Copy link
Contributor Author

It's unclear if this should be labeled [breaking-change], though it probably should be out of caution.

@alexcrichton
Copy link
Member

I think I kinda forget what the warnings are here, but what does the warning look like? I'm a little surprised that we'd have to go through and add this explicitly everywhere, but perhaps that's what we settled on?

@apasel422
Copy link
Contributor Author

"Case 1" mentioned in RFC 1214 seems to imply that this will eventually be necessary, even if it isn't enforced by the compiler right now.

My intuition is that if Clone: Sized, then Default etc. should also be. #27641 added a number of these bounds. Maybe @nikomatsakis can clarify if these will be necessary.

@alexcrichton
Copy link
Member

Hm ok, I'm a little surprised that these warnings are delayed rather than being emitted on the trait definition itself. For now though this seems fine, so I'm gonna r+

@bors: r+ 863bb1f

bors added a commit that referenced this pull request Oct 25, 2015
Using these traits in an object context previously resulted in an RFC 1214 warning.
@bors
Copy link
Contributor

bors commented Oct 25, 2015

⌛ Testing commit 863bb1f with merge 2a41821...

@bors bors merged commit 863bb1f into rust-lang:master Oct 25, 2015
@apasel422 apasel422 deleted the wf branch October 25, 2015 20:32
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.

4 participants