]> git.lizzy.rs Git - rust.git/blob - src/test/ui/for-loop-while/for-destruct.rs
Rollup merge of #100861 - RalfJung:const-ice, r=oli-obk
[rust.git] / src / test / ui / for-loop-while / for-destruct.rs
1 // run-pass
2
3 struct Pair { x: isize, y: isize }
4
5 pub fn main() {
6     for elt in &(vec![Pair {x: 10, y: 20}, Pair {x: 30, y: 0}]) {
7         assert_eq!(elt.x + elt.y, 30);
8     }
9 }