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:
parent
a294b35060
commit
6815c2e8e8
5 changed files with 124 additions and 6 deletions
|
@ -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!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue