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