We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2750d3a commit dbc2b55Copy full SHA for dbc2b55
library/std/src/thread/mod.rs
@@ -999,12 +999,12 @@ impl ThreadId {
999
static mut COUNTER: u64 = 1;
1000
1001
unsafe {
1002
- let _guard = GUARD.lock();
+ let guard = GUARD.lock();
1003
1004
// If we somehow use up all our bits, panic so that we're not
1005
// covering up subtle bugs of IDs being reused.
1006
if COUNTER == u64::MAX {
1007
- drop(_guard); // in case the panic handler ends up calling `ThreadId::new()`, avoid reentrant lock acquire.
+ drop(guard); // in case the panic handler ends up calling `ThreadId::new()`, avoid reentrant lock acquire.
1008
panic!("failed to generate unique thread ID: bitspace exhausted");
1009
}
1010
0 commit comments