Closed
Description
static mut FOO: Option<Box<usize>> = None;
//<anon>:1:38: 1:42 error: mutable statics are not allowed to have owned pointers
//<anon>:1 static mut FOO: Option<Box<usize>> = None;
^~~~
I am not sure why this is forbidden, but it is certainly undocumented.
Also the TRPL says Furthermore, any type stored in a static must be Sync.
but does not mention that this is not true for static mut's.