fork/rust

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

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

master
4.8 KiB138 linesraw
1error[E0382]: use of partially moved value: `a`
2  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:17:11
3   |
4LL |         [_, _, _x] => {}
5   |                -- value partially moved here
6LL |     }
7LL |     match a {
8   |           ^ value used here after partial move
9   |
10   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
11help: borrow this binding in the pattern to avoid moving the value
12   |
13LL |         [_, _, ref _x] => {}
14   |                +++
15
16error[E0382]: use of partially moved value: `a`
17  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:28:11
18   |
19LL |         [_, _, (_x, _)] => {}
20   |                 -- value partially moved here
21LL |     }
22LL |     match a {
23   |           ^ value used here after partial move
24   |
25   = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
26help: borrow this binding in the pattern to avoid moving the value
27   |
28LL |         [_, _, (ref _x, _)] => {}
29   |                 +++
30
31error[E0382]: use of partially moved value: `a`
32  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:41:11
33   |
34LL |         [_x, _, _] => {}
35   |          -- value partially moved here
36LL |     }
37LL |     match a {
38   |           ^ value used here after partial move
39   |
40   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
41help: borrow this binding in the pattern to avoid moving the value
42   |
43LL |         [ref _x, _, _] => {}
44   |          +++
45
46error[E0382]: use of partially moved value: `a`
47  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:52:11
48   |
49LL |         [.., _x] => {}
50   |              -- value partially moved here
51LL |     }
52LL |     match a {
53   |           ^ value used here after partial move
54   |
55   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
56help: borrow this binding in the pattern to avoid moving the value
57   |
58LL |         [.., ref _x] => {}
59   |              +++
60
61error[E0382]: use of partially moved value: `a`
62  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:63:11
63   |
64LL |         [(_x, _), _, _] => {}
65   |           -- value partially moved here
66LL |     }
67LL |     match a {
68   |           ^ value used here after partial move
69   |
70   = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
71help: borrow this binding in the pattern to avoid moving the value
72   |
73LL |         [(ref _x, _), _, _] => {}
74   |           +++
75
76error[E0382]: use of partially moved value: `a`
77  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:74:11
78   |
79LL |         [.., (_x, _)] => {}
80   |               -- value partially moved here
81LL |     }
82LL |     match a {
83   |           ^ value used here after partial move
84   |
85   = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
86help: borrow this binding in the pattern to avoid moving the value
87   |
88LL |         [.., (ref _x, _)] => {}
89   |               +++
90
91error[E0382]: use of partially moved value: `a`
92  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:85:11
93   |
94LL |         [_, _y @ ..] => {}
95   |             -- value partially moved here
96LL |     }
97LL |     match a {
98   |           ^ value used here after partial move
99   |
100   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
101help: borrow this binding in the pattern to avoid moving the value
102   |
103LL |         [_, ref _y @ ..] => {}
104   |             +++
105
106error[E0382]: use of partially moved value: `a`
107  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:96:11
108   |
109LL |         [_y @ .., _] => {}
110   |          -- value partially moved here
111LL |     }
112LL |     match a {
113   |           ^ value used here after partial move
114   |
115   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
116help: borrow this binding in the pattern to avoid moving the value
117   |
118LL |         [ref _y @ .., _] => {}
119   |          +++
120
121error[E0382]: use of partially moved value: `a`
122  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:109:11
123   |
124LL |         [x @ .., _, _] => {}
125   |          - value partially moved here
126LL |     }
127LL |     match a {
128   |           ^ value used here after partial move
129   |
130   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
131help: borrow this binding in the pattern to avoid moving the value
132   |
133LL |         [ref x @ .., _, _] => {}
134   |          +++
135
136error: aborting due to 9 previous errors
137
138For more information about this error, try `rustc --explain E0382`.