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.
2 parents 60b071f + ccb36a6 commit f9d62a8Copy full SHA for f9d62a8
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
+ // lifetime 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