@@ -270,6 +270,8 @@ impl<T> fmt::Debug for TryLockError<T> {
270
270
match * self {
271
271
#[ cfg( panic = "unwind" ) ]
272
272
TryLockError :: Poisoned ( ..) => "Poisoned(..)" . fmt ( f) ,
273
+ #[ cfg( not( panic = "unwind" ) ) ]
274
+ TryLockError :: Poisoned ( ref p) => match p. _never { } ,
273
275
TryLockError :: WouldBlock => "WouldBlock" . fmt ( f) ,
274
276
}
275
277
}
@@ -281,6 +283,8 @@ impl<T> fmt::Display for TryLockError<T> {
281
283
match * self {
282
284
#[ cfg( panic = "unwind" ) ]
283
285
TryLockError :: Poisoned ( ..) => "poisoned lock: another task failed inside" ,
286
+ #[ cfg( not( panic = "unwind" ) ) ]
287
+ TryLockError :: Poisoned ( ref p) => match p. _never { } ,
284
288
TryLockError :: WouldBlock => "try_lock failed because the operation would block" ,
285
289
}
286
290
. fmt ( f)
@@ -294,6 +298,8 @@ impl<T> Error for TryLockError<T> {
294
298
match * self {
295
299
#[ cfg( panic = "unwind" ) ]
296
300
TryLockError :: Poisoned ( ref p) => p. description ( ) ,
301
+ #[ cfg( not( panic = "unwind" ) ) ]
302
+ TryLockError :: Poisoned ( ref p) => match p. _never { } ,
297
303
TryLockError :: WouldBlock => "try_lock failed because the operation would block" ,
298
304
}
299
305
}
@@ -303,6 +309,8 @@ impl<T> Error for TryLockError<T> {
303
309
match * self {
304
310
#[ cfg( panic = "unwind" ) ]
305
311
TryLockError :: Poisoned ( ref p) => Some ( p) ,
312
+ #[ cfg( not( panic = "unwind" ) ) ]
313
+ TryLockError :: Poisoned ( ref p) => match p. _never { } ,
306
314
_ => None ,
307
315
}
308
316
}
0 commit comments