]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs
Add regression test for #66756
[rust.git] / src / test / ui / consts / control-flow / exhaustive-c-like-enum-match.rs
1 // Test for <https://github.com/rust-lang/rust/issues/66756>
2
3 // check-pass
4
5 #![feature(const_if_match)]
6
7 enum E {
8     A,
9     B,
10     C
11 }
12
13 const fn f(e: E) {
14     match e {
15         E::A => {}
16         E::B => {}
17         E::C => {}
18     }
19 }
20
21 const fn g(e: E) {
22     match e {
23         _ => {}
24     }
25 }
26
27 fn main() {}