Skip to content

Commit 9617d7c

Browse files
committed
Combine similar tests for const match
See #66788 (comment) for context.
1 parent 809e180 commit 9617d7c

File tree

2 files changed

+11
-22
lines changed

2 files changed

+11
-22
lines changed

src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,14 @@ const fn f(e: E) {
1818
}
1919
}
2020

21-
fn main() {}
21+
const fn g(e: E) -> usize {
22+
match e {
23+
_ => 0
24+
}
25+
}
26+
27+
fn main() {
28+
const X: usize = g(E::C);
29+
assert_eq!(X, 0);
30+
assert_eq!(g(E::A), 0);
31+
}

src/test/ui/consts/control-flow/single-arm-match-wild.rs

-21
This file was deleted.

0 commit comments

Comments
 (0)