1 // Tests that if you move from `x.f` or `x[0]`, `x` is inaccessible.
2 // Also tests that we give a more specific error message.
4 struct Foo { f: String, y: isize }
5 fn consume(_s: String) {}
9 let x = vec!["hi".to_string()];
10 consume(x.into_iter().next().unwrap());
11 touch(&x[0]); //~ ERROR borrow of moved value: `x`