1
Fork 0

Add error module with Error and FromError traits

As per [RFC 70](https://github.com/rust-lang/rfcs/blob/master/active/0070-error-chaining.md)

Closes #17747

Note that the `error` module must live in `std` in order to refer to `String`.

Note that, until multidispatch lands, the `FromError` trait cannot be
usefully implemented outside of the blanket impl given here.
This commit is contained in:
Aaron Turon 2014-10-03 14:23:09 -07:00
parent a294b35060
commit 6815c2e8e8
5 changed files with 124 additions and 6 deletions

View file

@ -218,6 +218,7 @@ pub mod time;
/* Common traits */
pub mod error;
pub mod from_str;
pub mod num;
pub mod to_string;
@ -257,6 +258,7 @@ mod std {
pub use hash;
pub use comm; // used for select!()
pub use error; // used for try!()
pub use fmt; // used for any formatting strings
pub use io; // used for println!()
pub use local_data; // used for local_data_key!()