rustc/tests/ui/consts/const-enum-byref-self.rs
2023-08-02 10:33:26 +02:00

19 lines
246 B
Rust

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