2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2015-03-25 17:06:52 -07:00
|
|
|
struct Foo(isize, isize);
|
2012-10-30 15:53:06 -07:00
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2012-10-30 15:53:06 -07:00
|
|
|
let x = Foo(1, 2);
|
|
|
|
match x {
|
|
|
|
Foo(a, b) => {
|
2013-05-18 22:02:45 -04:00
|
|
|
assert_eq!(a, 1);
|
|
|
|
assert_eq!(b, 2);
|
2013-09-24 22:16:43 -07:00
|
|
|
println!("{} {}", a, b);
|
2012-10-30 15:53:06 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|