blob: de75368578d9fda69f54330165d48f576440626c [file] [log] [blame]
// Issue #16205.
#![feature(box_syntax)]
struct Foo {
a: [Box<isize>; 3],
}
fn main() {
let mut y = 1;
let x = Some(&mut y);
for &a in x.iter() { //~ ERROR cannot move out
}
let f = Foo {
a: [box 3, box 4, box 5],
};
for &a in &f.a { //~ ERROR cannot move out
}
let x: Option<Box<_>> = Some(box 1);
for &a in x.iter() { //~ ERROR cannot move out
}
}