You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We talked about this at the most recent workweek, but I believe this code should compile as-is:
use std::sync::atomics;staticmutCNT: atomics::AtomicUint = atomics::INIT_ATOMIC_UINT;fnmain(){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.