]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-enum-byref-self.rs
Rollup merge of #64603 - gilescope:unused-lifetime-warning, r=matthewjasper
[rust.git] / src / test / ui / consts / const-enum-byref-self.rs
1 // run-pass
2 #![allow(dead_code)]
3
4 enum E { V, VV(isize) }
5 static C: E = E::V;
6
7 impl E {
8     pub fn method(&self) {
9         match *self {
10             E::V => {}
11             E::VV(..) => panic!()
12         }
13     }
14 }
15
16 pub fn main() {
17     C.method()
18 }