Closed
Description
This code assigning to a static mut
causes an ICE when run with feature(nll)
:
#![feature(nll)]
static y: u32 = 22;
static mut x: &'static u32 = &y;
fn foo() {
unsafe { x = &y; }
}
fn main() { }
On the playground, I get this:
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.25.0-nightly (9fd7da904 2018-01-25) running on x86_64-unknown-linux-gnu
thread 'rustc' panicked at 'internal error: entered unreachable code', librustc_mir/dataflow/impls/borrows.rs:400:50
note: Run with `RUST_BACKTRACE=1` for a backtrace.