Closed
Description
I'm getting a ICE when compiling my crate with the current nightly. This minimal example reproduces it:
#![feature(nll)]
#![feature(thread_local)]
#[thread_local] static mut X1:u64 = 0;
struct S1 {
a:&'static mut u64,
}
impl S1 {
fn new(_x:u64) -> S1 {
S1 { a:unsafe { &mut X1 } }
}
}
fn main() {
S1::new(0).a;
}
error: internal compiler error: unexpected region for local data ReStatic
--> src/main.rs:12:30
|
12 | S1 { a:unsafe { &mut X1 } }
|