From 97a2b2638d36fbd9f69c80bd146cdbe9d87e7bcc Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Sat, 17 Jan 2015 12:20:11 -0800 Subject: [PATCH] Remove Send bound from Error trait. --- src/libstd/error.rs | 4 ++-- src/libstd/io/mod.rs | 6 +++--- src/libstd/os.rs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libstd/error.rs b/src/libstd/error.rs index 9963e4861b778..ff12846197806 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -18,7 +18,7 @@ //! chain information: //! //! ``` -//! trait Error: Send { +//! trait Error { //! fn description(&self) -> &str; //! //! fn detail(&self) -> Option { None } @@ -87,7 +87,7 @@ use string::{FromUtf8Error, FromUtf16Error}; /// 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; diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index bab4dafd090bd..86afc6decab5c 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -234,7 +234,7 @@ use error::{FromError, Error}; 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 @@ impl Error for IoError { } } -impl FromError for Box { - fn from_error(err: IoError) -> Box { +impl FromError for Box { + fn from_error(err: IoError) -> Box { box err } } diff --git a/src/libstd/os.rs b/src/libstd/os.rs index fc0c838a3f118..78db6c158a89d 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -37,7 +37,7 @@ use error::{FromError, Error}; 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 @@ impl Error for MapError { fn detail(&self) -> Option { Some(format!("{:?}", self)) } } -impl FromError for Box { - fn from_error(err: MapError) -> Box { +impl FromError for Box { + fn from_error(err: MapError) -> Box { box err } }