2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
struct Bar(isize, isize);
|
2012-11-30 16:29:28 -08:00
|
|
|
|
2013-03-22 14:00:15 -07:00
|
|
|
static X: Bar = Bar(1, 2);
|
2012-11-30 16:29:28 -08:00
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2012-11-30 16:29:28 -08:00
|
|
|
match X {
|
|
|
|
Bar(x, y) => {
|
2013-05-18 22:02:45 -04:00
|
|
|
assert_eq!(x, 1);
|
|
|
|
assert_eq!(y, 2);
|
2012-11-30 16:29:28 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|