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