Closed
Description
We talked about this at the most recent workweek, but I believe this code should compile as-is:
use std::sync::atomics;
static mut CNT: atomics::AtomicUint = atomics::INIT_ATOMIC_UINT;
fn main() {
CNT.fetch_add(1, atomics::SeqCst);
}
Specifically, you should be allowed to take the address (&
-pointer) of a static mut
, and you should continue to need unsafe
to take a &mut
-pointer to a static mut
.