1 #![feature(box_syntax)]
9 impl<T> Index<usize> for MyVec<T> {
12 fn index(&self, i: usize) -> &T {
18 let v = MyVec::<Box<_>> { data: vec![box 1, box 2, box 3] };
19 let good = &v[0]; // Shouldn't fail here
21 //~^ ERROR cannot move out of index of `MyVec<Box<i32>>`