fork/rust

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

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
9.9 KiB253 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
6   |        |
7   |        help: consider further restricting this bound: `A: Copy +`
8LL |     lhs + rhs;
9   |     --- value moved here
10LL |     drop(lhs);
11   |          ^^^ value used here after move
12
13error[E0382]: use of moved value: `rhs`
14  --> $DIR/binop-consume-args.rs:8:10
15   |
16LL | fn add<A: Add<B, Output=()>, B>(lhs: A, rhs: B) {
17   |                              -          --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
18   |                              |
19   |                              help: consider restricting this bound: `B: Copy`
20LL |     lhs + rhs;
21   |           --- value moved here
22LL |     drop(lhs);
23LL |     drop(rhs);
24   |          ^^^ value used here after move
25
26error[E0382]: use of moved value: `lhs`
27  --> $DIR/binop-consume-args.rs:13:10
28   |
29LL | fn sub<A: Sub<B, Output=()>, B>(lhs: A, rhs: B) {
30   |        --                       --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
31   |        |
32   |        help: consider further restricting this bound: `A: Copy +`
33LL |     lhs - rhs;
34   |     --- value moved here
35LL |     drop(lhs);
36   |          ^^^ value used here after move
37
38error[E0382]: use of moved value: `rhs`
39  --> $DIR/binop-consume-args.rs:14:10
40   |
41LL | fn sub<A: Sub<B, Output=()>, B>(lhs: A, rhs: B) {
42   |                              -          --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
43   |                              |
44   |                              help: consider restricting this bound: `B: Copy`
45LL |     lhs - rhs;
46   |           --- value moved here
47LL |     drop(lhs);
48LL |     drop(rhs);
49   |          ^^^ value used here after move
50
51error[E0382]: use of moved value: `lhs`
52  --> $DIR/binop-consume-args.rs:19:10
53   |
54LL | fn mul<A: Mul<B, Output=()>, B>(lhs: A, rhs: B) {
55   |        --                       --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
56   |        |
57   |        help: consider further restricting this bound: `A: Copy +`
58LL |     lhs * rhs;
59   |     --- value moved here
60LL |     drop(lhs);
61   |          ^^^ value used here after move
62
63error[E0382]: use of moved value: `rhs`
64  --> $DIR/binop-consume-args.rs:20:10
65   |
66LL | fn mul<A: Mul<B, Output=()>, B>(lhs: A, rhs: B) {
67   |                              -          --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
68   |                              |
69   |                              help: consider restricting this bound: `B: Copy`
70LL |     lhs * rhs;
71   |           --- value moved here
72LL |     drop(lhs);
73LL |     drop(rhs);
74   |          ^^^ value used here after move
75
76error[E0382]: use of moved value: `lhs`
77  --> $DIR/binop-consume-args.rs:25:10
78   |
79LL | fn div<A: Div<B, Output=()>, B>(lhs: A, rhs: B) {
80   |        --                       --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
81   |        |
82   |        help: consider further restricting this bound: `A: Copy +`
83LL |     lhs / rhs;
84   |     --- value moved here
85LL |     drop(lhs);
86   |          ^^^ value used here after move
87
88error[E0382]: use of moved value: `rhs`
89  --> $DIR/binop-consume-args.rs:26:10
90   |
91LL | fn div<A: Div<B, Output=()>, B>(lhs: A, rhs: B) {
92   |                              -          --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
93   |                              |
94   |                              help: consider restricting this bound: `B: Copy`
95LL |     lhs / rhs;
96   |           --- value moved here
97LL |     drop(lhs);
98LL |     drop(rhs);
99   |          ^^^ value used here after move
100
101error[E0382]: use of moved value: `lhs`
102  --> $DIR/binop-consume-args.rs:31:10
103   |
104LL | fn rem<A: Rem<B, Output=()>, B>(lhs: A, rhs: B) {
105   |        --                       --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
106   |        |
107   |        help: consider further restricting this bound: `A: Copy +`
108LL |     lhs % rhs;
109   |     --- value moved here
110LL |     drop(lhs);
111   |          ^^^ value used here after move
112
113error[E0382]: use of moved value: `rhs`
114  --> $DIR/binop-consume-args.rs:32:10
115   |
116LL | fn rem<A: Rem<B, Output=()>, B>(lhs: A, rhs: B) {
117   |                              -          --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
118   |                              |
119   |                              help: consider restricting this bound: `B: Copy`
120LL |     lhs % rhs;
121   |           --- value moved here
122LL |     drop(lhs);
123LL |     drop(rhs);
124   |          ^^^ value used here after move
125
126error[E0382]: use of moved value: `lhs`
127  --> $DIR/binop-consume-args.rs:37:10
128   |
129LL | fn bitand<A: BitAnd<B, Output=()>, B>(lhs: A, rhs: B) {
130   |           --                          --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
131   |           |
132   |           help: consider further restricting this bound: `A: Copy +`
133LL |     lhs & rhs;
134   |     --- value moved here
135LL |     drop(lhs);
136   |          ^^^ value used here after move
137
138error[E0382]: use of moved value: `rhs`
139  --> $DIR/binop-consume-args.rs:38:10
140   |
141LL | fn bitand<A: BitAnd<B, Output=()>, B>(lhs: A, rhs: B) {
142   |                                    -          --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
143   |                                    |
144   |                                    help: consider restricting this bound: `B: Copy`
145LL |     lhs & rhs;
146   |           --- value moved here
147LL |     drop(lhs);
148LL |     drop(rhs);
149   |          ^^^ value used here after move
150
151error[E0382]: use of moved value: `lhs`
152  --> $DIR/binop-consume-args.rs:43:10
153   |
154LL | fn bitor<A: BitOr<B, Output=()>, B>(lhs: A, rhs: B) {
155   |          --                         --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
156   |          |
157   |          help: consider further restricting this bound: `A: Copy +`
158LL |     lhs | rhs;
159   |     --- value moved here
160LL |     drop(lhs);
161   |          ^^^ value used here after move
162
163error[E0382]: use of moved value: `rhs`
164  --> $DIR/binop-consume-args.rs:44:10
165   |
166LL | fn bitor<A: BitOr<B, Output=()>, B>(lhs: A, rhs: B) {
167   |                                  -          --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
168   |                                  |
169   |                                  help: consider restricting this bound: `B: Copy`
170LL |     lhs | rhs;
171   |           --- value moved here
172LL |     drop(lhs);
173LL |     drop(rhs);
174   |          ^^^ value used here after move
175
176error[E0382]: use of moved value: `lhs`
177  --> $DIR/binop-consume-args.rs:49:10
178   |
179LL | fn bitxor<A: BitXor<B, Output=()>, B>(lhs: A, rhs: B) {
180   |           --                          --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
181   |           |
182   |           help: consider further restricting this bound: `A: Copy +`
183LL |     lhs ^ rhs;
184   |     --- value moved here
185LL |     drop(lhs);
186   |          ^^^ value used here after move
187
188error[E0382]: use of moved value: `rhs`
189  --> $DIR/binop-consume-args.rs:50:10
190   |
191LL | fn bitxor<A: BitXor<B, Output=()>, B>(lhs: A, rhs: B) {
192   |                                    -          --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
193   |                                    |
194   |                                    help: consider restricting this bound: `B: Copy`
195LL |     lhs ^ rhs;
196   |           --- value moved here
197LL |     drop(lhs);
198LL |     drop(rhs);
199   |          ^^^ value used here after move
200
201error[E0382]: use of moved value: `lhs`
202  --> $DIR/binop-consume-args.rs:55:10
203   |
204LL | fn shl<A: Shl<B, Output=()>, B>(lhs: A, rhs: B) {
205   |        --                       --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
206   |        |
207   |        help: consider further restricting this bound: `A: Copy +`
208LL |     lhs << rhs;
209   |     --- value moved here
210LL |     drop(lhs);
211   |          ^^^ value used here after move
212
213error[E0382]: use of moved value: `rhs`
214  --> $DIR/binop-consume-args.rs:56:10
215   |
216LL | fn shl<A: Shl<B, Output=()>, B>(lhs: A, rhs: B) {
217   |                              -          --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
218   |                              |
219   |                              help: consider restricting this bound: `B: Copy`
220LL |     lhs << rhs;
221   |            --- value moved here
222LL |     drop(lhs);
223LL |     drop(rhs);
224   |          ^^^ value used here after move
225
226error[E0382]: use of moved value: `lhs`
227  --> $DIR/binop-consume-args.rs:61:10
228   |
229LL | fn shr<A: Shr<B, Output=()>, B>(lhs: A, rhs: B) {
230   |        --                       --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
231   |        |
232   |        help: consider further restricting this bound: `A: Copy +`
233LL |     lhs >> rhs;
234   |     --- value moved here
235LL |     drop(lhs);
236   |          ^^^ value used here after move
237
238error[E0382]: use of moved value: `rhs`
239  --> $DIR/binop-consume-args.rs:62:10
240   |
241LL | fn shr<A: Shr<B, Output=()>, B>(lhs: A, rhs: B) {
242   |                              -          --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
243   |                              |
244   |                              help: consider restricting this bound: `B: Copy`
245LL |     lhs >> rhs;
246   |            --- value moved here
247LL |     drop(lhs);
248LL |     drop(rhs);
249   |          ^^^ value used here after move
250
251error: aborting due to 20 previous errors
252
253For more information about this error, try `rustc --explain E0382`.