rust/tests/ui/consts/const-enum-structlike.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
233 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
enum E {
S0 { s: String },
S1 { u: usize }
}
static C: E = E::S1 { u: 23 };
2013-03-27 11:58:28 -05:00
pub fn main() {
match C {
E::S0 { .. } => panic!(),
E::S1 { u } => assert_eq!(u, 23)
}
}