]> git.lizzy.rs Git - rust.git/commitdiff
Make `std::error::Error` not inherit from Send
authorJonathan Reem <jonathan.reem@gmail.com>
Fri, 27 Mar 2015 23:35:16 +0000 (16:35 -0700)
committerJonathan Reem <jonathan.reem@gmail.com>
Fri, 27 Mar 2015 23:35:16 +0000 (16:35 -0700)
The Send bound is an unnecessary restriction, and though provided as a
convenience, can't be removed by downstream code.

The removal of this bound is a [breaking-change] since it
removes an implicit Send bound on all `E: Error` and all
`Error` trait objects.

To migrate, consider if your code actually requires the Send
bound and, if so, add it explicitly.

Fixes #23774

src/libcore/error.rs

index d7b4c9411fb4efc0bfbd9f715dc5ab7cb2df5356..51f3369a75bd3c0cd1cec4b9cae32f82bbbb19f6 100644 (file)
@@ -87,7 +87,7 @@
 
 /// Base functionality for all errors in Rust.
 #[stable(feature = "rust1", since = "1.0.0")]
-pub trait Error: Debug + Display + Send {
+pub trait Error: Debug + Display {
     /// A short description of the error.
     ///
     /// The description should not contain newlines or sentence-ending