mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
17 lines
234 B
Rust
17 lines
234 B
Rust
//@ run-pass
|
|
#![allow(dead_code)]
|
|
|
|
enum E {
|
|
S0 { s: String },
|
|
S1 { u: usize }
|
|
}
|
|
|
|
static C: E = E::S1 { u: 23 };
|
|
|
|
pub fn main() {
|
|
match C {
|
|
E::S0 { .. } => panic!(),
|
|
E::S1 { u } => assert_eq!(u, 23)
|
|
}
|
|
}
|