From 6815c2e8e8dae3d8dedfe95e985a79c57841bdb2 Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Fri, 3 Oct 2014 14:23:09 -0700 Subject: 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. --- src/libstd/lib.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libstd/lib.rs') diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 67080f4551f..f10a1d5e5ed 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -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!() -- cgit 1.4.1-3-g733a5