about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2014-10-03 14:23:09 -0700
committerAaron Turon <aturon@mozilla.com>2014-11-02 15:25:38 -0800
commit6815c2e8e8dae3d8dedfe95e985a79c57841bdb2 (patch)
tree38fb59aa600802ead160c0abfe2c69b7f5aec563 /src/libcore
parenta294b35060e069007ee46e190a6f0a19fa3eaab8 (diff)
downloadrust-6815c2e8e8dae3d8dedfe95e985a79c57841bdb2.tar.gz
rust-6815c2e8e8dae3d8dedfe95e985a79c57841bdb2.zip
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.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/prelude.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/prelude.rs b/src/libcore/prelude.rs
index 64917fb2541..0d4979a3575 100644
--- a/src/libcore/prelude.rs
+++ b/src/libcore/prelude.rs
@@ -37,8 +37,6 @@ pub use ops::{Shl, Shr};
 pub use ops::{Index, IndexMut};
 pub use ops::{Slice, SliceMut};
 pub use ops::{Fn, FnMut, FnOnce};
-pub use option::{Option, Some, None};
-pub use result::{Result, Ok, Err};
 
 // Reexported functions
 pub use iter::range;
@@ -56,7 +54,9 @@ pub use iter::{OrdIterator, MutableDoubleEndedIterator, ExactSize};
 pub use num::{Num, NumCast, CheckedAdd, CheckedSub, CheckedMul};
 pub use num::{Signed, Unsigned, Float};
 pub use num::{Primitive, Int, ToPrimitive, FromPrimitive};
+pub use option::{Option, Some, None};
 pub use ptr::RawPtr;
+pub use result::{Result, Ok, Err};
 pub use str::{Str, StrSlice};
 pub use tuple::{Tuple1, Tuple2, Tuple3, Tuple4};
 pub use tuple::{Tuple5, Tuple6, Tuple7, Tuple8};