Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Send bound from Error trait. #21312

Merged
merged 1 commit into from
Jan 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libstd/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! chain information:
//!
//! ```
//! trait Error: Send {
//! trait Error {
//! fn description(&self) -> &str;
//!
//! fn detail(&self) -> Option<String> { None }
Expand Down Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -937,8 +937,8 @@ impl Error for MapError {
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
}
}
Expand Down