summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-enum-byref-self.rs
blob: b7e14bfb76585d933a85c5910936fc43136afb8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// run-pass
#![allow(dead_code)]

enum E { V, VV(isize) }
static C: E = E::V;

impl E {
    pub fn method(&self) {
        match *self {
            E::V => {}
            E::VV(..) => panic!()
        }
    }
}

pub fn main() {
    C.method()
}