]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-enum-byref.rs
Rollup merge of #106927 - Ezrashaw:e0606-make-machine-applicable, r=estebank
[rust.git] / tests / ui / consts / const-enum-byref.rs
1 // run-pass
2 #![allow(dead_code)]
3
4 enum E { V, VV(isize) }
5 static C: E = E::V;
6
7 fn f(a: &E) {
8     match *a {
9         E::V => {}
10         E::VV(..) => panic!()
11     }
12 }
13
14 pub fn main() {
15     f(&C)
16 }