rust/tests/ui/consts/const-enum-byref.rs
2023-01-11 09:32:08 +00:00

17 lines
194 B
Rust

// run-pass
#![allow(dead_code)]
enum E { V, VV(isize) }
static C: E = E::V;
fn f(a: &E) {
match *a {
E::V => {}
E::VV(..) => panic!()
}
}
pub fn main() {
f(&C)
}