2017-12-10 19:47:55 +00:00
|
|
|
error[E0508]: cannot move out of type `[Foo]`, a non-copy slice
|
|
|
|
--> $DIR/borrowck-move-out-of-vec-tail.rs:30:18
|
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | &[Foo { string: a },
|
2017-12-10 19:47:55 +00:00
|
|
|
| ^ - hint: to prevent move, use `ref a` or `ref mut a`
|
|
|
|
| __________________|
|
|
|
|
| |
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | | //~^ ERROR cannot move out of type `[Foo]`
|
|
|
|
LL | | //~| cannot move out
|
|
|
|
LL | | //~| to prevent move
|
|
|
|
LL | | Foo { string: b }] => {
|
2017-12-10 19:47:55 +00:00
|
|
|
| |_________________________________-__^ cannot move out of here
|
|
|
|
| |
|
|
|
|
| ...and here (use `ref b` or `ref mut b`)
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-02-19 20:40:25 +00:00
|
|
|
If you want more information on this error, try using "rustc --explain E0508"
|