Remove Send bound from Error trait.
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
//! chain information:
|
//! chain information:
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
//! trait Error: Send {
|
//! trait Error {
|
||||||
//! fn description(&self) -> &str;
|
//! fn description(&self) -> &str;
|
||||||
//!
|
//!
|
||||||
//! fn detail(&self) -> Option<String> { None }
|
//! fn detail(&self) -> Option<String> { None }
|
||||||
@@ -87,7 +87,7 @@ use string::{FromUtf8Error, FromUtf16Error};
|
|||||||
|
|
||||||
/// Base functionality for all errors in Rust.
|
/// Base functionality for all errors in Rust.
|
||||||
#[unstable = "the exact API of this trait may change"]
|
#[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.
|
/// A short description of the error; usually a static string.
|
||||||
fn description(&self) -> &str;
|
fn description(&self) -> &str;
|
||||||
|
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ use error::{FromError, Error};
|
|||||||
use fmt;
|
use fmt;
|
||||||
use int;
|
use int;
|
||||||
use iter::{Iterator, IteratorExt};
|
use iter::{Iterator, IteratorExt};
|
||||||
use marker::Sized;
|
use marker::{Sized, Send};
|
||||||
use mem::transmute;
|
use mem::transmute;
|
||||||
use ops::FnOnce;
|
use ops::FnOnce;
|
||||||
use option::Option;
|
use option::Option;
|
||||||
@@ -363,8 +363,8 @@ impl Error for IoError {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FromError<IoError> for Box<Error> {
|
impl FromError<IoError> for Box<Error + Send> {
|
||||||
fn from_error(err: IoError) -> Box<Error> {
|
fn from_error(err: IoError) -> Box<Error + Send> {
|
||||||
box err
|
box err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ use error::{FromError, Error};
|
|||||||
use fmt;
|
use fmt;
|
||||||
use io::{IoResult, IoError};
|
use io::{IoResult, IoError};
|
||||||
use iter::{Iterator, IteratorExt};
|
use iter::{Iterator, IteratorExt};
|
||||||
use marker::Copy;
|
use marker::{Copy, Send};
|
||||||
use libc::{c_void, c_int, c_char};
|
use libc::{c_void, c_int, c_char};
|
||||||
use libc;
|
use libc;
|
||||||
use boxed::Box;
|
use boxed::Box;
|
||||||
@@ -937,8 +937,8 @@ impl Error for MapError {
|
|||||||
fn detail(&self) -> Option<String> { Some(format!("{:?}", self)) }
|
fn detail(&self) -> Option<String> { Some(format!("{:?}", self)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FromError<MapError> for Box<Error> {
|
impl FromError<MapError> for Box<Error + Send> {
|
||||||
fn from_error(err: MapError) -> Box<Error> {
|
fn from_error(err: MapError) -> Box<Error + Send> {
|
||||||
box err
|
box err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user