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

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

19 lines
247 B
Rust
Raw Normal View History

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