]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-enum-byref-self.rs
Rollup merge of #107004 - compiler-errors:new-solver-new-candidates-2, r=lcnr
[rust.git] / tests / 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 }