Open
Description
I tried this code:
fn main() {
match () {
_ if loop {} => (),
_ => (),
}
println!("nya :3");
}
I expected to see this happen: compiler to emit a warning that the first arm and later code is unreachable (since loop{}
never terminates and has type !
).
Instead, this happened: the code compiles without warnings.
Meta
rustc version: 1.84.0-beta.4 (2024-12-07 202008a1b8de96d2e5b6)