convert: remove FromError, use From<E> instead#23879
Merged
bors merged 1 commit intorust-lang:masterfrom Apr 1, 2015
Merged
Conversation
This removes the FromError trait, since it can now be expressed using the new convert::Into trait. All implementations of FromError<E> where changed to From<E>, and `try!` was changed to use From::from instead. Because this removes FromError, it is a breaking change, but fixing it simply requires changing the words `FromError` to `From`, and `from_error` to `from`. [breaking-change]
Contributor
Author
|
I'm still building the tests, but I fixed each instance that showed up with grep. |
Contributor
Author
|
Erg, this is hitting coherence errors. I can't have |
Contributor
|
I'm working on resolving that with #23875 I previously hadn't deprecated |
Collaborator
|
☔ The latest upstream changes (presumably #23884) made this pull request unmergeable. Please resolve the merge conflicts. |
Member
|
This sounds like a great idea to me! I'm all for it (although I'd land it either after or in tandem with #23875) |
Member
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this pull request
Mar 31, 2015
Conflicts: src/libcore/error.rs
andersk
added a commit
to andersk/byteorder-rs
that referenced
this pull request
Apr 2, 2015
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
andersk
added a commit
to andersk/rustc-serialize-rs
that referenced
this pull request
Apr 2, 2015
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
andersk
added a commit
to andersk/num-rs
that referenced
this pull request
Apr 2, 2015
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
andersk
added a commit
to andersk/image-rs
that referenced
this pull request
Apr 2, 2015
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
gbersac
pushed a commit
to gbersac/rustc-serialize
that referenced
this pull request
May 8, 2015
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
gbersac
pushed a commit
to gbersac/rustc-serialize
that referenced
this pull request
May 23, 2015
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes the FromError trait, since it can now be expressed using
the new convert::Into trait. All implementations of FromError where
changed to From, and
try!was changed to use From::from instead.Because this removes FromError, it is a breaking change, but fixing it
simply requires changing the words
FromErrortoFrom, andfrom_errortofrom.[breaking-change]
r? @alexcrichton or @aturon