Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
apasel422:wf
Oct 25, 2015
Merged

bors merged 1 commit into
rust-lang:masterfrom
apasel422:wf

Conversation

@apasel422

Copy link
Copy Markdown
Contributor

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

@rust-highfive

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

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

@alexcrichton

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

bors commented Oct 25, 2015

Copy link
Copy Markdown
Collaborator

⌛ 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