diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index 68ea486933ab1..4097eb5549efe 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -546,6 +546,8 @@ impl Builder { } let main = Box::new(main); + // SAFETY: dynamic size and alignment of the Box remain the same. See below for why the + // lifetime change is justified. #[cfg(bootstrap)] let main = unsafe { mem::transmute::, Box>(main) };