std:🧵 add SAFETY comment
This commit is contained in:
parent
95f6a01e8f
commit
ccb36a688d
@ -546,6 +546,8 @@ impl Builder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let main = Box::new(main);
|
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)]
|
#[cfg(bootstrap)]
|
||||||
let main =
|
let main =
|
||||||
unsafe { mem::transmute::<Box<dyn FnOnce() + 'a>, Box<dyn FnOnce() + 'static>>(main) };
|
unsafe { mem::transmute::<Box<dyn FnOnce() + 'a>, Box<dyn FnOnce() + 'static>>(main) };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user