2018-07-15 16:11:54 -05:00
|
|
|
error[E0508]: cannot move out of type `[T]`, a non-copy slice
|
2019-12-29 18:23:42 -06:00
|
|
|
--> $DIR/issue-12567.rs:2:11
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | match (l1, l2) {
|
|
|
|
| ^^^^^^^^ cannot move out of here
|
|
|
|
...
|
2018-07-15 16:11:54 -05:00
|
|
|
LL | (&[], &[hd, ..]) | (&[hd, ..], &[])
|
2019-04-22 02:40:08 -05:00
|
|
|
| -- data moved here
|
|
|
|
LL | => println!("one empty"),
|
|
|
|
LL | (&[hd1, ..], &[hd2, ..])
|
2019-12-27 11:53:00 -06:00
|
|
|
| --- ...and here
|
2019-04-22 02:40:08 -05:00
|
|
|
|
|
2019-11-25 14:32:57 -06:00
|
|
|
= note: move occurs because these variables have types that don't implement the `Copy` trait
|
2022-12-08 19:14:56 -06:00
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
|
|
|
|
LL | (&[], &[ref hd, ..]) | (&[hd, ..], &[])
|
|
|
|
| +++
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
|
|
|
|
LL | (&[ref hd1, ..], &[hd2, ..])
|
|
|
|
| +++
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
error[E0508]: cannot move out of type `[T]`, a non-copy slice
|
2019-12-29 18:23:42 -06:00
|
|
|
--> $DIR/issue-12567.rs:2:11
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | match (l1, l2) {
|
|
|
|
| ^^^^^^^^ cannot move out of here
|
|
|
|
...
|
|
|
|
LL | (&[], &[hd, ..]) | (&[hd, ..], &[])
|
|
|
|
| -- data moved here
|
|
|
|
LL | => println!("one empty"),
|
2018-07-15 16:11:54 -05:00
|
|
|
LL | (&[hd1, ..], &[hd2, ..])
|
2019-12-27 11:53:00 -06:00
|
|
|
| --- ...and here
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-11-25 14:32:57 -06:00
|
|
|
= note: move occurs because these variables have types that don't implement the `Copy` trait
|
2022-12-08 19:14:56 -06:00
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
|
|
|
|
LL | (&[], &[ref hd, ..]) | (&[hd, ..], &[])
|
|
|
|
| +++
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
|
|
|
|
LL | (&[hd1, ..], &[ref hd2, ..])
|
|
|
|
| +++
|
2018-07-15 16:11:54 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
error: aborting due to 2 previous errors
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0508`.
|