mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
Rollup merge of #31589 - reem:remove-unnecessary-poison-bounds, r=sfackler
None
This commit is contained in:
commit
8a5ec51eff
@ -111,7 +111,7 @@ impl<T> fmt::Display for PoisonError<T> {
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: Send + Reflect> Error for PoisonError<T> {
|
||||
impl<T: Reflect> Error for PoisonError<T> {
|
||||
fn description(&self) -> &str {
|
||||
"poisoned lock: another task failed inside"
|
||||
}
|
||||
@ -158,14 +158,17 @@ impl<T> fmt::Debug for TryLockError<T> {
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: Send + Reflect> fmt::Display for TryLockError<T> {
|
||||
impl<T> fmt::Display for TryLockError<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.description().fmt(f)
|
||||
match *self {
|
||||
TryLockError::Poisoned(..) => "poisoned lock: another task failed inside",
|
||||
TryLockError::WouldBlock => "try_lock failed because the operation would block"
|
||||
}.fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: Send + Reflect> Error for TryLockError<T> {
|
||||
impl<T: Reflect> Error for TryLockError<T> {
|
||||
fn description(&self) -> &str {
|
||||
match *self {
|
||||
TryLockError::Poisoned(ref p) => p.description(),
|
||||
|
Loading…
Reference in New Issue
Block a user