diff options
| author | Barosl LEE <github@barosl.com> | 2015-01-21 02:16:47 +0900 |
|---|---|---|
| committer | Barosl LEE <github@barosl.com> | 2015-01-21 02:16:47 +0900 |
| commit | e63443d536a0e6157dce0cfb39dfcd2d614fb357 (patch) | |
| tree | eb169eeac748e5ceefae1bbb0d31b40b24edd683 /src/libstd/io | |
| parent | 409c9972a954b56eb278c91666d33b09aeb00c6a (diff) | |
| parent | 97a2b2638d36fbd9f69c80bd146cdbe9d87e7bcc (diff) | |
| download | rust-e63443d536a0e6157dce0cfb39dfcd2d614fb357.tar.gz rust-e63443d536a0e6157dce0cfb39dfcd2d614fb357.zip | |
Rollup merge of #21312 - michaelsproul:remove-error-send-bound, r=aturon
As discussed with @aturon, this PR removes the `Send` bound from `std::error::Error`, allowing us to implement `Error` for error types containing non-`Send` types. Current examples include `PoisonError` and `TryLockError` from `std::sync` which contain a Guard that we don't want sent between tasks. [breaking-change]
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index e2b71cd43af..dc21416df7b 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<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 } } |
