summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-enum-byref.rs
blob: badf529465432fac8db303bcd6ade4bddab65b9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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)
}