macro_rules! fallback_generic_static { {$key:ty => static $ident:ident : &$type:ty = &$init:expr;} => { ... }; }
Expand description
Declare a static variable, keyed by a type. Its type must be a shared reference to a type that implements Sync.
Available on all targets (falls back to a fast HashMap on non-supported platforms).
Example
#![feature(const_collections_with_hasher)]
fallback_generic_static!(
T => static name: &Mutex<String> = &Mutex::new("Ferris".to_string());
);