1 // Test that we do not permit moves from &[] matched by a vec pattern.
3 #![feature(slice_patterns)]
5 #[derive(Clone, Debug)]
12 Foo { string: "foo".to_string() },
13 Foo { string: "bar".to_string() },
14 Foo { string: "baz".to_string() }
18 [_, ref tail @ ..] => {
20 //~^ ERROR cannot move out of type `[Foo]`
22 Foo { string: b }] => {
28 let z = tail[0].clone();