diff options
Diffstat (limited to 'src/libstd/sync/poison.rs')
| -rw-r--r-- | src/libstd/sync/poison.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libstd/sync/poison.rs b/src/libstd/sync/poison.rs index e28c3c37b6f..c97fcf7cefb 100644 --- a/src/libstd/sync/poison.rs +++ b/src/libstd/sync/poison.rs @@ -53,6 +53,7 @@ pub struct Guard { /// is held. The precise semantics for when a lock is poisoned is documented on /// each lock, but once a lock is poisoned then all future acquisitions will /// return this error. +#[derive(Show)] #[stable] pub struct PoisonError<T> { guard: T, @@ -60,6 +61,7 @@ pub struct PoisonError<T> { /// An enumeration of possible errors which can occur while calling the /// `try_lock` method. +#[derive(Show)] #[stable] pub enum TryLockError<T> { /// The lock could not be acquired because another task failed while holding @@ -90,7 +92,8 @@ pub type LockResult<Guard> = Result<Guard, PoisonError<Guard>>; #[stable] pub type TryLockResult<Guard> = Result<Guard, TryLockError<Guard>>; -impl<T> fmt::Show for PoisonError<T> { +#[stable] +impl<T> fmt::Display for PoisonError<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.description().fmt(f) } @@ -130,7 +133,8 @@ impl<T> FromError<PoisonError<T>> for TryLockError<T> { } } -impl<T> fmt::Show for TryLockError<T> { +#[stable] +impl<T> fmt::Display for TryLockError<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.description().fmt(f) } |
