Non-exhaustive pattern error when matching on !
#115716
Labels
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=4a9450423c54a62242360d62e9480bf3
I expected to see this happen: complain about the uninitialized binding
x
.Like it does in https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=99dc49582c1bce26b084e33bfd366026
Instead, this happened: error E0004: non-exhaustive patterns:
()
not coveredA match on a scrutinee of type
!
should not expect a pattern of type()
.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: