Missing unreachable code/arm warning, when a match guard is diverging #134734
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
L-unreachable_code
Lint: unreachable_code
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
(playground)
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)
The text was updated successfully, but these errors were encountered: