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
{{ message }}
Repository navigation
Addressing a Share static mut should be safe #13232
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.
Activity
alexcrichton commentedon Mar 31, 2014
cc @flaper87
alexcrichton commentedon Mar 31, 2014
Nominating.
flaper87 commentedon Mar 31, 2014
Makes sense to me! Assigning myself to this issue.
pnkfelix commentedon Apr 3, 2014
Marking P-low, not on 1.0 milestone. (We can add this backwards compatibly, at least if one ignores lints.)
10 remaining items
flaper87 commentedon Mar 23, 2015
Bug fixed by 4c62486
Auto merge of rust-lang#13232 - jplatte:mbe-refactor, r=Veykril
Auto merge of rust-lang#13232 - Alexendoo:path-prefix, r=flip1995