about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-23 15:09:08 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-23 15:09:08 -0700
commitb97e1cc28e0d3fe6a745a02a7c1750564a090f34 (patch)
tree52476c90e92bbe4d82c75371ef8ded0733b472a5 /src/libstd/io
parentfd13400627108fbf3998545f782ed44422e344bf (diff)
parent9231ceb6dd273d8101e1b3906e6060f802e6423d (diff)
downloadrust-b97e1cc28e0d3fe6a745a02a7c1750564a090f34.tar.gz
rust-b97e1cc28e0d3fe6a745a02a7c1750564a090f34.zip
rollup merge of #23541: aturon/stab-error
This small commit stabilizes the `Error` trait as-is, except that `Send`
and `Debug` are added as constraints. The `Send` constraint is because
most uses of `Error` will be for trait objects, and by default we would
like these objects to be transferrable between threads. The `Debug`
constraint is to ensure that e.g. `Box<Error>` is `Debug`, and because
types that implement `Display` should certainly implement `Debug` in any case.

In the near future we expect to add `Any`-like downcasting features to
`Error`, but this is waiting on some additional
mechanisms (`Reflect`). It will be added before 1.0 via default methods.

[breaking-change]

r? @alexcrichton

Closes #21790
Diffstat (limited to 'src/libstd/io')
-rw-r--r--src/libstd/io/buffered.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs
index 43eec695274..4def601f1c0 100644
--- a/src/libstd/io/buffered.rs
+++ b/src/libstd/io/buffered.rs
@@ -258,7 +258,7 @@ impl<W> FromError<IntoInnerError<W>> for Error {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<W> error::Error for IntoInnerError<W> {
+impl<W: Send + fmt::Debug> error::Error for IntoInnerError<W> {
     fn description(&self) -> &str {
         error::Error::description(self.error())
     }