-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
convert: remove FromError, use From<E> instead #23879
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]
I'm still building the tests, but I fixed each instance that showed up with grep. |
Erg, this is hitting coherence errors. I can't have |
I'm working on resolving that with #23875 I previously hadn't deprecated |
☔ The latest upstream changes (presumably #23884) made this pull request unmergeable. Please resolve the merge conflicts. |
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) |
Conflicts: src/libcore/error.rs
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
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
FromError
toFrom
, andfrom_error
tofrom
.[breaking-change]
r? @alexcrichton or @aturon