Skip to content

Commit 4ecf505

Browse files
committed
Silence dead code warning for ThreadInit::init
1 parent ff8ed14 commit 4ecf505

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/std/src/sys/thread/unsupported.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ use crate::num::NonZero;
44
use crate::thread::ThreadInit;
55
use crate::time::Duration;
66

7+
// Silence dead code warnings for the otherwise unused ThreadInit::init() call.
8+
#[expect(dead_code)]
9+
fn dummy_init_call(init: Box<ThreadInit>) {
10+
drop(init.init());
11+
}
12+
713
pub struct Thread(!);
814

915
pub const DEFAULT_MIN_STACK_SIZE: usize = 64 * 1024;

0 commit comments

Comments
 (0)