]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/borrowck/borrowck-move-out-of-vec-tail.rs
slice_patterns: remove gates in tests
[rust.git] / src / test / ui / borrowck / borrowck-move-out-of-vec-tail.rs
index 5f6e01f2df0ff8a5628136f59550511eda093b3f..8ece81a3c845e9209a20699ff9664cfc854cbcde 100644 (file)
@@ -1,7 +1,5 @@
 // Test that we do not permit moves from &[] matched by a vec pattern.
 
-#![feature(slice_patterns)]
-
 #[derive(Clone, Debug)]
 struct Foo {
     string: String
@@ -15,12 +13,10 @@ pub fn main() {
     ];
     let x: &[Foo] = &x;
     match *x {
-        [_, ref tail..] => {
+        [_, ref tail @ ..] => {
             match tail {
+            //~^ ERROR cannot move out of type `[Foo]`
                 &[Foo { string: a },
-                //~^ ERROR cannot move out of type `[Foo]`
-                //~| cannot move out
-                //~| to prevent move
                   Foo { string: b }] => {
                 }
                 _ => {