static_ref

Macro static_ref 

Source
macro_rules! static_ref {
    ($expr:expr) => { ... };
}
Expand description

Get shared reference to static mut.

use gcore::static_ref;

static mut X: usize = 0;

let _: &usize = unsafe { static_ref!(X) };