Skip to content

Commit 37f440f

Browse files
committed
Add wildcard test for const_if_match
Closes #66758
1 parent 91642e3 commit 37f440f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// check-pass
2+
3+
#![feature(const_if_match)]
4+
5+
enum E {
6+
A,
7+
B,
8+
C
9+
}
10+
11+
const fn f(e: E) -> usize {
12+
match e {
13+
_ => 0
14+
}
15+
}
16+
17+
fn main() {
18+
assert_eq!(f(E::A), 0);
19+
}

0 commit comments

Comments
 (0)