2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
struct Pair { x: isize, y: isize }
|
2014-02-21 17:41:51 -06:00
|
|
|
|
2013-02-01 21:43:17 -06:00
|
|
|
pub fn main() {
|
2016-10-29 16:54:04 -05:00
|
|
|
for elt in &(vec![Pair {x: 10, y: 20}, Pair {x: 30, y: 0}]) {
|
2013-05-18 21:02:45 -05:00
|
|
|
assert_eq!(elt.x + elt.y, 30);
|
2011-08-01 08:46:17 -05:00
|
|
|
}
|
|
|
|
}
|