macro_rules! static_mut {
($expr:expr) => { ... };
}Expand description
Get mutable reference to static mut.
Note that getting two mutable references to static mut is UB.
use gcore::static_mut;
static mut X: usize = 0;
let _: &mut usize = unsafe { static_mut!(X) };