]> git.lizzy.rs Git - rust.git/commitdiff
Remove Send bound from Error trait.
authorMichael Sproul <micsproul@gmail.com>
Sat, 17 Jan 2015 20:20:11 +0000 (12:20 -0800)
committerMichael Sproul <micsproul@gmail.com>
Sat, 17 Jan 2015 20:20:11 +0000 (12:20 -0800)
src/libstd/error.rs
src/libstd/io/mod.rs
src/libstd/os.rs

index 9963e4861b778772967f4274a1e59ac6aee39a49..ff12846197806f6bf16ab2980b0eb72c36ba8378 100644 (file)
@@ -18,7 +18,7 @@
 //! chain information:
 //!
 //! ```
-//! trait Error: Send {
+//! trait Error {
 //!     fn description(&self) -> &str;
 //!
 //!     fn detail(&self) -> Option<String> { None }
@@ -87,7 +87,7 @@
 
 /// Base functionality for all errors in Rust.
 #[unstable = "the exact API of this trait may change"]
-pub trait Error: Send {
+pub trait Error {
     /// A short description of the error; usually a static string.
     fn description(&self) -> &str;
 
index bab4dafd090bdfc40ec6f90f5c2072744d16835d..86afc6decab5cc0ae9d4433c3496a63dab5e17fd 100644 (file)
 use fmt;
 use int;
 use iter::{Iterator, IteratorExt};
-use marker::Sized;
+use marker::{Sized, Send};
 use mem::transmute;
 use ops::FnOnce;
 use option::Option;
@@ -363,8 +363,8 @@ fn detail(&self) -> Option<String> {
     }
 }
 
-impl FromError<IoError> for Box<Error> {
-    fn from_error(err: IoError) -> Box<Error> {
+impl FromError<IoError> for Box<Error + Send> {
+    fn from_error(err: IoError) -> Box<Error + Send> {
         box err
     }
 }
index fc0c838a3f11800418dce248a4c98c951be7f81c..78db6c158a89d07fa7220632229f83736d45ed61 100644 (file)
@@ -37,7 +37,7 @@
 use fmt;
 use io::{IoResult, IoError};
 use iter::{Iterator, IteratorExt};
-use marker::Copy;
+use marker::{Copy, Send};
 use libc::{c_void, c_int, c_char};
 use libc;
 use boxed::Box;
@@ -937,8 +937,8 @@ fn description(&self) -> &str { "memory map error" }
     fn detail(&self) -> Option<String> { Some(format!("{:?}", self)) }
 }
 
-impl FromError<MapError> for Box<Error> {
-    fn from_error(err: MapError) -> Box<Error> {
+impl FromError<MapError> for Box<Error + Send> {
+    fn from_error(err: MapError) -> Box<Error + Send> {
         box err
     }
 }