Skip to content

Commit 4182076

Browse files
committed
Remove unreachable expression warning from std.
1 parent d461291 commit 4182076

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/std/src/sync/poison.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
//! while it is locked exclusively (write mode). If a panic occurs in any reader,
6161
//! then the lock will not be poisoned.
6262
63+
// If we are not unwinding, `PoisonError` is uninhabited.
64+
#![cfg_attr(not(panic = "unwind"), expect(unreachable_code))]
65+
6366
#[stable(feature = "rust1", since = "1.0.0")]
6467
pub use self::condvar::{Condvar, WaitTimeoutResult};
6568
#[unstable(feature = "mapped_lock_guards", issue = "117108")]

0 commit comments

Comments
 (0)