fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.5 KiB47 linesraw
1error[E0508]: cannot move out of type `[T]`, a non-copy slice
2  --> $DIR/issue-12567.rs:2:11
3   |
4LL |     match (l1, l2) {
5   |           ^^^^^^^^ cannot move out of here
6...
7LL |         (&[], &[hd, ..]) | (&[hd, ..], &[])
8   |                 -- data moved here
9LL |             => println!("one empty"),
10LL |         (&[hd1, ..], &[hd2, ..])
11   |            --- ...and here
12   |
13   = note: move occurs because these variables have types that don't implement the `Copy` trait
14help: consider borrowing the pattern binding
15   |
16LL |         (&[], &[ref hd, ..]) | (&[hd, ..], &[])
17   |                 +++
18help: consider borrowing the pattern binding
19   |
20LL |         (&[ref hd1, ..], &[hd2, ..])
21   |            +++
22
23error[E0508]: cannot move out of type `[T]`, a non-copy slice
24  --> $DIR/issue-12567.rs:2:11
25   |
26LL |     match (l1, l2) {
27   |           ^^^^^^^^ cannot move out of here
28...
29LL |         (&[], &[hd, ..]) | (&[hd, ..], &[])
30   |                 -- data moved here
31LL |             => println!("one empty"),
32LL |         (&[hd1, ..], &[hd2, ..])
33   |                        --- ...and here
34   |
35   = note: move occurs because these variables have types that don't implement the `Copy` trait
36help: consider borrowing the pattern binding
37   |
38LL |         (&[], &[ref hd, ..]) | (&[hd, ..], &[])
39   |                 +++
40help: consider borrowing the pattern binding
41   |
42LL |         (&[hd1, ..], &[ref hd2, ..])
43   |                        +++
44
45error: aborting due to 2 previous errors
46
47For more information about this error, try `rustc --explain E0508`.