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