about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/tests.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-02-22 18:09:53 +0100
committerGitHub <noreply@github.com>2024-02-22 18:09:53 +0100
commit5a87e1305758cb46f55958f529c9974e763749c5 (patch)
tree024cc1817886476f4d8c9e3e2c2af5208438123a /compiler/rustc_mir_transform/src/coverage/tests.rs
parent379ef9bd36cdbe144f0df7868bf80bd0cd07268c (diff)
parent0610f59194575054ab8cfa5d677240a6bc07817e (diff)
downloadrust-5a87e1305758cb46f55958f529c9974e763749c5.tar.gz
rust-5a87e1305758cb46f55958f529c9974e763749c5.zip
Rollup merge of #121393 - Nadrieril:match-lowering-testcase, r=matthewjasper
match lowering: Introduce a `TestCase` enum to replace most matching on `PatKind`

Introduces `TestCase` that represents the specific outcome of a test. It complements `TestKind` which represents a test. In `MatchPair::new()` we select the appropriate `TestCase` for the pattern, and after that we almost never have to inspect the pattern directly during match lowering.

Together with https://github.com/rust-lang/rust/pull/120904, this makes `MatchPair` into a standalone abstraction that hides the details of `thir::Pat`. This will become even truer in the next PR where I make `TestCase` handle or patterns. This opens the door to a lot of future simplifications.

r? `@matthewjasper`
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/tests.rs')
0 files changed, 0 insertions, 0 deletions