]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr
Rollup merge of #59697 - euclio:label-fixes, r=zackmdavis
[rust.git] / src / test / ui / borrowck / borrowck-move-out-of-vec-tail.stderr
1 error[E0508]: cannot move out of type `[Foo]`, a non-copy slice
2   --> $DIR/borrowck-move-out-of-vec-tail.rs:19:19
3    |
4 LL |             match tail {
5    |                   ^^^^ cannot move out of here
6 LL |
7 LL |                 &[Foo { string: a },
8    |                                 - data moved here
9 LL |                   Foo { string: b }] => {
10    |                                 - ...and here
11    |
12 note: move occurs because these variables have types that don't implement the `Copy` trait
13   --> $DIR/borrowck-move-out-of-vec-tail.rs:21:33
14    |
15 LL |                 &[Foo { string: a },
16    |                                 ^
17 LL |                   Foo { string: b }] => {
18    |                                 ^
19 help: consider removing the `&`
20    |
21 LL |                 [Foo { string: a },
22 LL |                   Foo { string: b }] => {
23    |
24
25 error: aborting due to previous error
26
27 For more information about this error, try `rustc --explain E0508`.