error[E0508]: cannot move out of type `[Foo]`, a non-copy slice --> $DIR/borrowck-move-out-of-vec-tail.rs:20:18 | LL | &[Foo { string: a }, | ^ - hint: to prevent move, use `ref a` or `ref mut a` | __________________| | | LL | | //~^ ERROR cannot move out of type `[Foo]` LL | | //~| cannot move out LL | | //~| to prevent move LL | | Foo { string: b }] => { | |_________________________________-__^ cannot move out of here | | | ...and here (use `ref b` or `ref mut b`) error: aborting due to previous error For more information about this error, try `rustc --explain E0508`.