mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
19 lines
247 B
Rust
19 lines
247 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()
|
|
}
|