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

22 lines
250 B
Rust
Raw Normal View History

2019-11-26 13:37:16 -06:00
// Test for <https://github.com/rust-lang/rust/issues/66756>
// check-pass
#![feature(const_if_match)]
enum E {
A,
B,
C
}
const fn f(e: E) {
match e {
E::A => {}
E::B => {}
E::C => {}
}
}
fn main() {}