2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2013-02-24 16:48:34 -06:00
|
|
|
enum E {
|
2014-05-22 18:57:53 -05:00
|
|
|
S0 { s: String },
|
2015-03-25 19:06:52 -05:00
|
|
|
S1 { u: usize }
|
2013-02-24 16:48:34 -06:00
|
|
|
}
|
|
|
|
|
2014-11-06 02:05:53 -06:00
|
|
|
static C: E = E::S1 { u: 23 };
|
2013-02-24 16:48:34 -06:00
|
|
|
|
2013-03-27 11:58:28 -05:00
|
|
|
pub fn main() {
|
2013-02-24 16:48:34 -06:00
|
|
|
match C {
|
2014-11-06 02:05:53 -06:00
|
|
|
E::S0 { .. } => panic!(),
|
2015-06-07 13:00:38 -05:00
|
|
|
E::S1 { u } => assert_eq!(u, 23)
|
2013-02-24 16:48:34 -06:00
|
|
|
}
|
|
|
|
}
|