Skip to content

Commit

Permalink
Add regression test for #66756
Browse files Browse the repository at this point in the history
  • Loading branch information
ecstatic-morse committed Nov 26, 2019
1 parent 2626cfb commit 582affd
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs
@@ -0,0 +1,27 @@
// 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 => {}
}
}

const fn g(e: E) {
match e {
_ => {}
}
}

fn main() {}

0 comments on commit 582affd

Please sign in to comment.