I ran across a weird case where Rust was telling me that I didn't need mut on a variable, even though I was clearly mutating it! After some fiddling around I managed to get the following code to compile which just looks broken.
fn main() {
let x: u32;
loop {
match 1 {
1 => {}
_ => {
x = 5;
break;
}
}
}
dbg!(x);
}
Running it (playground) results in some kind of crash. What's going on here? Is this a compiler bug? I tried it on nightly and it still times out.