We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95f6a01 commit 186295bCopy full SHA for 186295b
library/std/src/thread/mod.rs
@@ -546,6 +546,8 @@ impl Builder {
546
}
547
548
let main = Box::new(main);
549
+ // SAFETY: dynamic size and alignment of the Box remain the same. See below for why the
550
+ // lfetime change is justified.
551
#[cfg(bootstrap)]
552
let main =
553
unsafe { mem::transmute::<Box<dyn FnOnce() + 'a>, Box<dyn FnOnce() + 'static>>(main) };
0 commit comments