]> git.lizzy.rs Git - rust.git/commit
Auto merge of #78995 - Nadrieril:clean-empty-match, r=varkor
authorbors <bors@rust-lang.org>
Wed, 18 Nov 2020 21:24:40 +0000 (21:24 +0000)
committerbors <bors@rust-lang.org>
Wed, 18 Nov 2020 21:24:40 +0000 (21:24 +0000)
commit8256379832b5ecb7f71e8c5e2018446482223c12
tree1d5e866b6b006d84b3d8ce102a1022234ed2e4ae
parent8d2d0014922e9f541694bfe87642749239990e0e
parent69821cf8df86c8f4366e0c16a0a7de8d0135b90f
Auto merge of #78995 - Nadrieril:clean-empty-match, r=varkor

Handle empty matches cleanly in exhaustiveness checking

This removes the special-casing of empty matches that was done in `check_match`. This fixes most of https://github.com/rust-lang/rust/issues/55123.
Somewhat unrelatedly, I also made `_match.rs` more self-contained, because I think it's cleaner.

r? `@varkor`
`@rustbot` modify labels: +A-exhaustiveness-checking
compiler/rustc_mir_build/src/thir/pattern/check_match.rs