mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Rollup merge of #117281 - RalfJung:thread-safety, r=thomcc
std::thread : add SAFETY comment I forgot to add this in https://github.com/rust-lang/rust/pull/117266.
This commit is contained in:
commit
f9d62a84f0
@ -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<dyn FnOnce() + 'a>, Box<dyn FnOnce() + 'static>>(main) };
|
||||
|
Loading…
Reference in New Issue
Block a user