@@ -56,18 +56,6 @@ borrowck_returned_lifetime_short =
56
56
borrowck_used_impl_require_static =
57
57
the used `impl` has a `'static` requirement
58
58
59
- borrowck_capture_kind_label =
60
- capture is { $kind_desc } because of use here
61
-
62
- borrowck_var_borrow_by_use_place_in_generator =
63
- borrow occurs due to use of { $place } in closure in generator
64
-
65
- borrowck_var_borrow_by_use_place_in_closure =
66
- borrow occurs due to use of { $place } in closure
67
-
68
- borrowck_var_borrow_by_use_place =
69
- borrow occurs due to use of { $place }
70
-
71
59
borrowck_borrow_due_to_use_generator =
72
60
borrow occurs due to use in generator
73
61
@@ -101,12 +89,63 @@ borrowck_capture_mut =
101
89
borrowck_capture_move =
102
90
capture is moved because of use here
103
91
92
+ borrowck_var_borrow_by_use_place_in_generator =
93
+ { $is_single_var ->
94
+ *[ true ] borrow occurs
95
+ [ false ] borrows occur
96
+ } due to use of { $place } in generator
97
+
98
+ borrowck_var_borrow_by_use_place_in_closure =
99
+ { $is_single_var ->
100
+ *[ true ] borrow occurs
101
+ [ false ] borrows occur
102
+ } due to use of { $place } in closure
103
+
104
+ borrowck_var_borrow_by_use_in_generator =
105
+ borrow occurs due to use in generator
106
+
107
+ borrowck_var_borrow_by_use_in_closure =
108
+ borrow occurs due to use in closure
109
+
104
110
borrowck_var_move_by_use_place_in_generator =
105
111
move occurs due to use of { $place } in generator
106
112
107
113
borrowck_var_move_by_use_place_in_closure =
108
114
move occurs due to use of { $place } in closure
109
115
116
+ borrowck_var_move_by_use_in_generator =
117
+ move occurs due to use in generator
118
+
119
+ borrowck_var_move_by_use_in_closure =
120
+ move occurs due to use in closure
121
+
122
+ borrowck_partial_var_move_by_use_in_generator =
123
+ variable { $is_partial ->
124
+ [ true ] partially moved
125
+ *[ false ] moved
126
+ } due to use in generator
127
+
128
+ borrowck_partial_var_move_by_use_in_closure =
129
+ variable { $is_partial ->
130
+ [ true ] partially moved
131
+ *[ false ] moved
132
+ } due to use in closure
133
+
134
+ borrowck_var_first_borrow_by_use_place_in_generator =
135
+ first borrow occurs due to use of { $place } in generator
136
+
137
+ borrowck_var_first_borrow_by_use_place_in_closure =
138
+ first borrow occurs due to use of { $place } in closure
139
+
140
+ borrowck_var_second_borrow_by_use_place_in_generator =
141
+ second borrow occurs due to use of { $place } in generator
142
+
143
+ borrowck_var_second_borrow_by_use_place_in_closure =
144
+ second borrow occurs due to use of { $place } in closure
145
+
146
+ borrowck_var_mutable_borrow_by_use_place_in_closure =
147
+ mutable borrow occurs due to use of { $place } in closure
148
+
110
149
borrowck_cannot_move_when_borrowed =
111
150
cannot move out of { $place ->
112
151
[ value ] value
@@ -127,3 +166,90 @@ borrowck_opaque_type_non_generic_param =
127
166
[ true ] cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
128
167
*[ other ] this generic parameter must be used with a generic { $kind } parameter
129
168
}
169
+
170
+ borrowck_moved_due_to_call =
171
+ { $place_name } { $is_partial ->
172
+ [ true ] partially moved
173
+ *[ false ] moved
174
+ } due to this { $is_loop_message ->
175
+ [ true ] call, in previous iteration of loop
176
+ *[ false ] call
177
+ }
178
+
179
+ borrowck_moved_due_to_usage_in_operator =
180
+ { $place_name } { $is_partial ->
181
+ [ true ] partially moved
182
+ *[ false ] moved
183
+ } due to usage in { $is_loop_message ->
184
+ [ true ] operator, in previous iteration of loop
185
+ *[ false ] operator
186
+ }
187
+
188
+ borrowck_moved_due_to_implicit_into_iter_call =
189
+ { $place_name } { $is_partial ->
190
+ [ true ] partially moved
191
+ *[ false ] moved
192
+ } due to this implicit call to { $is_loop_message ->
193
+ [ true ] `.into_iter()`, in previous iteration of loop
194
+ *[ false ] `.into_iter()`
195
+ }
196
+
197
+ borrowck_moved_due_to_method_call =
198
+ { $place_name } { $is_partial ->
199
+ [ true ] partially moved
200
+ *[ false ] moved
201
+ } due to this method { $is_loop_message ->
202
+ [ true ] call, in previous iteration of loop
203
+ *[ false ] call
204
+ }
205
+
206
+ borrowck_value_moved_here =
207
+ value { $is_partial ->
208
+ [ true ] partially moved
209
+ *[ false ] moved
210
+ } { $is_move_msg ->
211
+ [ true ] into closure here
212
+ *[ false ] here
213
+ } { $is_loop_message ->
214
+ [ true ] , in previous iteration of loop
215
+ *[ false ] { " " }
216
+ }
217
+
218
+ borrowck_consider_borrow_type_contents =
219
+ help: consider calling `.as_ref()` or `.as_mut()` to borrow the type's contents
220
+
221
+ borrowck_moved_a_fn_once_in_call =
222
+ this value implements `FnOnce`, which causes it to be moved when called
223
+
224
+ borrowck_calling_operator_moves_lhs =
225
+ calling this operator moves the left-hand side
226
+
227
+ borrowck_func_take_self_moved_place =
228
+ `{ $func } ` takes ownership of the receiver `self`, which moves { $place_name }
229
+
230
+ borrowck_suggest_iterate_over_slice =
231
+ consider iterating over a slice of the `{ $ty } `'s content to avoid moving into the `for` loop
232
+
233
+ borrowck_suggest_create_freash_reborrow =
234
+ consider reborrowing the `Pin` instead of moving it
235
+
236
+ borrowck_value_capture_here =
237
+ value captured { $is_within ->
238
+ [ true ] here by generator
239
+ *[ false ] here
240
+ }
241
+
242
+ borrowck_move_out_place_here =
243
+ { $place } is moved here
244
+
245
+ borrowck_closure_invoked_twice =
246
+ closure cannot be invoked more than once because it moves the variable `{ $place_name } ` out of its environment
247
+
248
+ borrowck_closure_moved_twice =
249
+ closure cannot be moved more than once as it is not `Copy` due to moving the variable `{ $place_name } ` out of its environment
250
+
251
+ borrowck_ty_no_impl_copy =
252
+ { $is_partial_move ->
253
+ [ true ] partial move
254
+ *[ false ] move
255
+ } occurs because { $place } has type `{ $ty } `, which does not implement the `Copy` trait
0 commit comments