fork/rust

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

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

master
12.2 KiB333 linesraw
1error[E0382]: use of moved value: `lhs`
2  --> $DIR/binop-consume-args.rs:7:10
3   |
4LL | fn add<A: Add<B, Output=()>, B>(lhs: A, rhs: B) {
5   |                                 --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
6LL |     lhs + rhs;
7   |     --------- `lhs` moved due to usage in operator
8LL |     drop(lhs);
9   |          ^^^ value used here after move
10   |
11note: calling this operator moves the left-hand side
12  --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
13help: consider further restricting this bound
14   |
15LL | fn add<A: Add<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
16   |                             ++++++
17
18error[E0382]: use of moved value: `rhs`
19  --> $DIR/binop-consume-args.rs:8:10
20   |
21LL | fn add<A: Add<B, Output=()>, B>(lhs: A, rhs: B) {
22   |                                         --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
23LL |     lhs + rhs;
24   |           --- value moved here
25LL |     drop(lhs);
26LL |     drop(rhs);
27   |          ^^^ value used here after move
28   |
29help: consider restricting type parameter `B`
30   |
31LL | fn add<A: Add<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
32   |                               ++++++
33
34error[E0382]: use of moved value: `lhs`
35  --> $DIR/binop-consume-args.rs:13:10
36   |
37LL | fn sub<A: Sub<B, Output=()>, B>(lhs: A, rhs: B) {
38   |                                 --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
39LL |     lhs - rhs;
40   |     --------- `lhs` moved due to usage in operator
41LL |     drop(lhs);
42   |          ^^^ value used here after move
43   |
44note: calling this operator moves the left-hand side
45  --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
46help: consider further restricting this bound
47   |
48LL | fn sub<A: Sub<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
49   |                             ++++++
50
51error[E0382]: use of moved value: `rhs`
52  --> $DIR/binop-consume-args.rs:14:10
53   |
54LL | fn sub<A: Sub<B, Output=()>, B>(lhs: A, rhs: B) {
55   |                                         --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
56LL |     lhs - rhs;
57   |           --- value moved here
58LL |     drop(lhs);
59LL |     drop(rhs);
60   |          ^^^ value used here after move
61   |
62help: consider restricting type parameter `B`
63   |
64LL | fn sub<A: Sub<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
65   |                               ++++++
66
67error[E0382]: use of moved value: `lhs`
68  --> $DIR/binop-consume-args.rs:19:10
69   |
70LL | fn mul<A: Mul<B, Output=()>, B>(lhs: A, rhs: B) {
71   |                                 --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
72LL |     lhs * rhs;
73   |     --------- `lhs` moved due to usage in operator
74LL |     drop(lhs);
75   |          ^^^ value used here after move
76   |
77note: calling this operator moves the left-hand side
78  --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
79help: consider further restricting this bound
80   |
81LL | fn mul<A: Mul<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
82   |                             ++++++
83
84error[E0382]: use of moved value: `rhs`
85  --> $DIR/binop-consume-args.rs:20:10
86   |
87LL | fn mul<A: Mul<B, Output=()>, B>(lhs: A, rhs: B) {
88   |                                         --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
89LL |     lhs * rhs;
90   |           --- value moved here
91LL |     drop(lhs);
92LL |     drop(rhs);
93   |          ^^^ value used here after move
94   |
95help: consider restricting type parameter `B`
96   |
97LL | fn mul<A: Mul<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
98   |                               ++++++
99
100error[E0382]: use of moved value: `lhs`
101  --> $DIR/binop-consume-args.rs:25:10
102   |
103LL | fn div<A: Div<B, Output=()>, B>(lhs: A, rhs: B) {
104   |                                 --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
105LL |     lhs / rhs;
106   |     --------- `lhs` moved due to usage in operator
107LL |     drop(lhs);
108   |          ^^^ value used here after move
109   |
110note: calling this operator moves the left-hand side
111  --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
112help: consider further restricting this bound
113   |
114LL | fn div<A: Div<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
115   |                             ++++++
116
117error[E0382]: use of moved value: `rhs`
118  --> $DIR/binop-consume-args.rs:26:10
119   |
120LL | fn div<A: Div<B, Output=()>, B>(lhs: A, rhs: B) {
121   |                                         --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
122LL |     lhs / rhs;
123   |           --- value moved here
124LL |     drop(lhs);
125LL |     drop(rhs);
126   |          ^^^ value used here after move
127   |
128help: consider restricting type parameter `B`
129   |
130LL | fn div<A: Div<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
131   |                               ++++++
132
133error[E0382]: use of moved value: `lhs`
134  --> $DIR/binop-consume-args.rs:31:10
135   |
136LL | fn rem<A: Rem<B, Output=()>, B>(lhs: A, rhs: B) {
137   |                                 --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
138LL |     lhs % rhs;
139   |     --------- `lhs` moved due to usage in operator
140LL |     drop(lhs);
141   |          ^^^ value used here after move
142   |
143note: calling this operator moves the left-hand side
144  --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
145help: consider further restricting this bound
146   |
147LL | fn rem<A: Rem<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
148   |                             ++++++
149
150error[E0382]: use of moved value: `rhs`
151  --> $DIR/binop-consume-args.rs:32:10
152   |
153LL | fn rem<A: Rem<B, Output=()>, B>(lhs: A, rhs: B) {
154   |                                         --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
155LL |     lhs % rhs;
156   |           --- value moved here
157LL |     drop(lhs);
158LL |     drop(rhs);
159   |          ^^^ value used here after move
160   |
161help: consider restricting type parameter `B`
162   |
163LL | fn rem<A: Rem<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
164   |                               ++++++
165
166error[E0382]: use of moved value: `lhs`
167  --> $DIR/binop-consume-args.rs:37:10
168   |
169LL | fn bitand<A: BitAnd<B, Output=()>, B>(lhs: A, rhs: B) {
170   |                                       --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
171LL |     lhs & rhs;
172   |     --------- `lhs` moved due to usage in operator
173LL |     drop(lhs);
174   |          ^^^ value used here after move
175   |
176note: calling this operator moves the left-hand side
177  --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
178help: consider further restricting this bound
179   |
180LL | fn bitand<A: BitAnd<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
181   |                                   ++++++
182
183error[E0382]: use of moved value: `rhs`
184  --> $DIR/binop-consume-args.rs:38:10
185   |
186LL | fn bitand<A: BitAnd<B, Output=()>, B>(lhs: A, rhs: B) {
187   |                                               --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
188LL |     lhs & rhs;
189   |           --- value moved here
190LL |     drop(lhs);
191LL |     drop(rhs);
192   |          ^^^ value used here after move
193   |
194help: consider restricting type parameter `B`
195   |
196LL | fn bitand<A: BitAnd<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
197   |                                     ++++++
198
199error[E0382]: use of moved value: `lhs`
200  --> $DIR/binop-consume-args.rs:43:10
201   |
202LL | fn bitor<A: BitOr<B, Output=()>, B>(lhs: A, rhs: B) {
203   |                                     --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
204LL |     lhs | rhs;
205   |     --------- `lhs` moved due to usage in operator
206LL |     drop(lhs);
207   |          ^^^ value used here after move
208   |
209note: calling this operator moves the left-hand side
210  --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
211help: consider further restricting this bound
212   |
213LL | fn bitor<A: BitOr<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
214   |                                 ++++++
215
216error[E0382]: use of moved value: `rhs`
217  --> $DIR/binop-consume-args.rs:44:10
218   |
219LL | fn bitor<A: BitOr<B, Output=()>, B>(lhs: A, rhs: B) {
220   |                                             --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
221LL |     lhs | rhs;
222   |           --- value moved here
223LL |     drop(lhs);
224LL |     drop(rhs);
225   |          ^^^ value used here after move
226   |
227help: consider restricting type parameter `B`
228   |
229LL | fn bitor<A: BitOr<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
230   |                                   ++++++
231
232error[E0382]: use of moved value: `lhs`
233  --> $DIR/binop-consume-args.rs:49:10
234   |
235LL | fn bitxor<A: BitXor<B, Output=()>, B>(lhs: A, rhs: B) {
236   |                                       --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
237LL |     lhs ^ rhs;
238   |     --------- `lhs` moved due to usage in operator
239LL |     drop(lhs);
240   |          ^^^ value used here after move
241   |
242note: calling this operator moves the left-hand side
243  --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
244help: consider further restricting this bound
245   |
246LL | fn bitxor<A: BitXor<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
247   |                                   ++++++
248
249error[E0382]: use of moved value: `rhs`
250  --> $DIR/binop-consume-args.rs:50:10
251   |
252LL | fn bitxor<A: BitXor<B, Output=()>, B>(lhs: A, rhs: B) {
253   |                                               --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
254LL |     lhs ^ rhs;
255   |           --- value moved here
256LL |     drop(lhs);
257LL |     drop(rhs);
258   |          ^^^ value used here after move
259   |
260help: consider restricting type parameter `B`
261   |
262LL | fn bitxor<A: BitXor<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
263   |                                     ++++++
264
265error[E0382]: use of moved value: `lhs`
266  --> $DIR/binop-consume-args.rs:55:10
267   |
268LL | fn shl<A: Shl<B, Output=()>, B>(lhs: A, rhs: B) {
269   |                                 --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
270LL |     lhs << rhs;
271   |     ---------- `lhs` moved due to usage in operator
272LL |     drop(lhs);
273   |          ^^^ value used here after move
274   |
275note: calling this operator moves the left-hand side
276  --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
277help: consider further restricting this bound
278   |
279LL | fn shl<A: Shl<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
280   |                             ++++++
281
282error[E0382]: use of moved value: `rhs`
283  --> $DIR/binop-consume-args.rs:56:10
284   |
285LL | fn shl<A: Shl<B, Output=()>, B>(lhs: A, rhs: B) {
286   |                                         --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
287LL |     lhs << rhs;
288   |            --- value moved here
289LL |     drop(lhs);
290LL |     drop(rhs);
291   |          ^^^ value used here after move
292   |
293help: consider restricting type parameter `B`
294   |
295LL | fn shl<A: Shl<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
296   |                               ++++++
297
298error[E0382]: use of moved value: `lhs`
299  --> $DIR/binop-consume-args.rs:61:10
300   |
301LL | fn shr<A: Shr<B, Output=()>, B>(lhs: A, rhs: B) {
302   |                                 --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
303LL |     lhs >> rhs;
304   |     ---------- `lhs` moved due to usage in operator
305LL |     drop(lhs);
306   |          ^^^ value used here after move
307   |
308note: calling this operator moves the left-hand side
309  --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
310help: consider further restricting this bound
311   |
312LL | fn shr<A: Shr<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
313   |                             ++++++
314
315error[E0382]: use of moved value: `rhs`
316  --> $DIR/binop-consume-args.rs:62:10
317   |
318LL | fn shr<A: Shr<B, Output=()>, B>(lhs: A, rhs: B) {
319   |                                         --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
320LL |     lhs >> rhs;
321   |            --- value moved here
322LL |     drop(lhs);
323LL |     drop(rhs);
324   |          ^^^ value used here after move
325   |
326help: consider restricting type parameter `B`
327   |
328LL | fn shr<A: Shr<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
329   |                               ++++++
330
331error: aborting due to 20 previous errors
332
333For more information about this error, try `rustc --explain E0382`.