This was discussed at the recent work week, but it appears that our notes to not reflect a decision one way or another. I would expect this code to compile:
use std::sync::atomics;
fn main() {
let a = atomics::INIT_ATOMIC_UINT;
}
Specifically, you can "move" out of any non-mut static, it just turns in to a memcpy. The contents of the static have already been validated to not own anything and have no destructors, so this should be safe.
This was discussed at the recent work week, but it appears that our notes to not reflect a decision one way or another. I would expect this code to compile:
Specifically, you can "move" out of any non-
mutstatic, it just turns in to a memcpy. The contents of the static have already been validated to not own anything and have no destructors, so this should be safe.