Re:Hello, I’m Mr. Null. My Name Makes Me Invisible to Computers
by brobinson on Monday September 05, 2016 @03:29AM
(#12428690)
The only use case I've had for these personally is having a global config "constant" which can be reloaded behind a mutex. unsafe + Box::new() + mem::transmute() on a static mutable pointer. I believe I copied this from Servo based on a suggestion on IRC.
IIRC this was pre-1.0 Rust, so there's probably a better way to do it now.
[1] https://doc.rust-lang.org/std/primitive.pointer.html
[2] https://doc.rust-lang.org/std/ptr/fn.null.html