rust/tests/ui/consts/const-enum-byref.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
194 B
Rust
Raw Normal View History

// 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)
}