Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ee7f995

Browse files
committedMay 30, 2023
sort ftl messages alphabetically
1 parent 6d721f1 commit ee7f995

File tree

1 file changed

+349
-425
lines changed

1 file changed

+349
-425
lines changed
 

‎compiler/rustc_borrowck/messages.ftl

Lines changed: 349 additions & 425 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,115 @@
1-
borrowck_assign_due_to_use_closure =
2-
assignment occurs due to use in closure
1+
borrowck_and_data_moved_here = ...and here
32
4-
borrowck_move_unsized =
5-
cannot move a value of type `{$ty}`
6-
.label = the size of `{$ty}` cannot be statically determined
3+
borrowck_assign_data_behind_const_pointer =
4+
cannot assign to data in a `*const` pointer
75
8-
borrowck_higher_ranked_lifetime_error =
9-
higher-ranked lifetime error
6+
borrowck_assign_data_behind_deref =
7+
cannot assign to data in {$name}
108
11-
borrowck_could_not_prove =
12-
could not prove `{$predicate}`
9+
borrowck_assign_data_behind_index =
10+
cannot assign to data in an index of {$name}
11+
borrowck_assign_data_behind_ref =
12+
cannot assign to data in a `&` reference
1313
14-
borrowck_could_not_normalize =
15-
could not normalize `{$value}`
14+
borrowck_assign_due_to_use_closure =
15+
assignment occurs due to use in closure
1616
17-
borrowck_higher_ranked_subtype_error =
18-
higher-ranked subtype error
17+
borrowck_assign_due_to_use_generator =
18+
assign occurs due to use in generator
1919
20-
borrowck_generic_does_not_live_long_enough =
21-
`{$kind}` does not live long enough
20+
borrowck_assign_part_due_to_use_closure =
21+
assignment to part occurs due to use in closure
2222
23-
borrowck_move_borrowed =
24-
cannot move out of `{$desc}` because it is borrowed
23+
borrowck_assign_part_due_to_use_generator =
24+
assign to part occurs due to use in generator
2525
26-
borrowck_var_does_not_need_mut =
27-
variable does not need to be mutable
28-
.suggestion = remove this `mut`
26+
borrowck_assign_place_behind_const_pointer =
27+
cannot assign to {$place}, which is behind a `*const` pointer
2928
30-
borrowck_var_cannot_escape_closure =
31-
captured variable cannot escape `FnMut` closure body
32-
.note = `FnMut` closures only have access to their captured variables while they are executing...
33-
.cannot_escape = ...therefore, they cannot allow references to captured variables to escape
29+
borrowck_assign_place_behind_deref =
30+
cannot assign to {$place}, which is behind {$name}
3431
35-
borrowck_var_here_defined = variable defined here
32+
borrowck_assign_place_behind_index =
33+
cannot assign to {$place}, which is behind an index of {$ty}
3634
37-
borrowck_var_here_captured = variable captured here
35+
borrowck_assign_place_behind_ref =
36+
cannot assign to {$place}, which is behind a `&` reference
3837
39-
borrowck_closure_inferred_mut = inferred to be a `FnMut` closure
38+
borrowck_assign_place_declared_immute =
39+
cannot assign to {$any_place}, as it is not declared as mutable
4040
41-
borrowck_returned_closure_escaped =
42-
returns a closure that contains a reference to a captured variable, which then escapes the closure body
41+
borrowck_assign_place_in_fn =
42+
cannot assign to {$path}, as it is a captured variable in a `Fn` closure
4343
44-
borrowck_returned_async_block_escaped =
45-
returns an `async` block that contains a reference to a captured variable, which then escapes the closure body
44+
borrowck_assign_place_in_pattern_guard_immute =
45+
cannot assign to {$path}, as it is immutable for the pattern guard
4646
47-
borrowck_returned_ref_escaped =
48-
returns a reference to a captured variable which escapes the closure body
47+
borrowck_assign_place_static =
48+
cannot assign to immutable static item {$path}
4949
50-
borrowck_lifetime_constraints_error =
51-
lifetime may not live long enough
50+
borrowck_assign_symbol_declared_immute =
51+
cannot assign to {$any_place}, as `{$name}` is not declared as mutable
5252
53-
borrowck_returned_lifetime_wrong =
54-
{$mir_def_name} was supposed to return data with lifetime `{$outlived_fr_name}` but it is returning data with lifetime `{$fr_name}`
53+
borrowck_assign_symbol_static =
54+
cannot assign to {$path}, as `{$static_name}` is an immutable static item
5555
56-
borrowck_returned_lifetime_short =
57-
{$category}requires that `{$free_region_name}` must outlive `{$outlived_fr_name}`
56+
borrowck_assign_upvar_in_fn =
57+
cannot assign to {$path}, as `Fn` closures cannot mutate their captured variables
5858
59-
borrowck_used_impl_require_static =
60-
the used `impl` has a `'static` requirement
59+
borrowck_borrow_due_to_use_closure =
60+
borrow occurs due to use in closure
6161
6262
borrowck_borrow_due_to_use_generator =
6363
borrow occurs due to use in generator
6464
65-
borrowck_use_due_to_use_generator =
66-
use occurs due to use in generator
67-
>>>>>>> borrow_ck some diagnostic msg migration
68-
69-
borrowck_assign_due_to_use_generator =
70-
assign occurs due to use in generator
71-
72-
borrowck_assign_part_due_to_use_closure =
73-
assignment to part occurs due to use in closure
65+
borrowck_borrow_occurs_here = {$kind} borrow occurs here
7466
75-
borrowck_assign_part_due_to_use_generator =
76-
assign to part occurs due to use in generator
67+
borrowck_borrow_occurs_here_overlap =
68+
{$kind_new} borrow of {$msg_new} -- which overlaps with {$msg_old} -- occurs here
7769
78-
borrowck_borrow_due_to_use_closure =
79-
borrow occurs due to use in closure
70+
borrowck_borrow_occurs_here_via =
71+
{$kind_old} borrow occurs {$is_msg_old_empty ->
72+
*[true] here
73+
[false] here (via {$msg_old})
74+
}
8075
81-
borrowck_borrow_due_to_use_generator =
82-
borrow occurs due to use in generator
76+
borrowck_borrowed_temporary_value_dropped =
77+
temporary value dropped while borrowed
8378
8479
borrowck_calling_operator_moves_lhs =
8580
calling this operator moves the left-hand side
8681
82+
borrowck_cannot_assign =
83+
cannot assign
84+
85+
borrowck_cannot_assign_to_borrowed =
86+
cannot assign to {$desc ->
87+
[value] value
88+
*[other] {$desc}
89+
} because it is borrowed
90+
.label = {$desc ->
91+
[value] value
92+
*[other] {$desc}
93+
} is assigned to here but it was already borrowed
94+
.borrow_here_label = {$desc ->
95+
[value] value
96+
*[other] {$desc}
97+
} is borrowed here
98+
99+
borrowck_cannot_borrow_across_destructor =
100+
borrow may still be in use when destructor runs
101+
102+
borrowck_cannot_borrow_across_generator_yield =
103+
borrow may still be in use when generator yields
104+
.label = possible yield occurs here
105+
106+
borrowck_cannot_borrow_mut =
107+
cannot borrow as mutable
108+
109+
borrowck_cannot_move_out_of_interior_of_drop =
110+
cannot move out of type `{$container_ty}`, which implements the `Drop` trait
111+
.label = cannot move out of here
112+
87113
borrowck_cannot_move_when_borrowed =
88114
cannot move out of {$place ->
89115
[value] value
@@ -98,6 +124,85 @@ borrowck_cannot_move_when_borrowed =
98124
*[other] {$value_place}
99125
} occurs here
100126
127+
borrowck_cannot_mutably_borrow_multiply =
128+
cannot borrow {$is_place_empty ->
129+
*[true] {$new_place_name}
130+
[false] {$new_place_name} (via {$place})
131+
} as mutable more than once at a time
132+
.label = first mutable borrow occurs {$is_old_place_empty ->
133+
*[true] here
134+
[false] here (via {$old_place})
135+
}
136+
.second_mut_borrow_label = second mutable borrow occurs {$is_place_empty ->
137+
*[true] here
138+
[false] here (via {$place})
139+
}
140+
.first_mut_end_label = first borrow ends here
141+
142+
borrowck_cannot_mutably_borrow_multiply_same_span =
143+
cannot borrow {$is_place_empty ->
144+
*[true] {$new_place_name}
145+
[false] {$new_place_name} (via {$place})
146+
} as mutable more than once at a time
147+
.label = mutable borrow ends here
148+
149+
borrowck_cannot_reassign_immutable_arg =
150+
cannot assign to immutable argument {$place}
151+
152+
borrowck_cannot_reassign_immutable_var =
153+
cannot assign twice to immutable variable {$place}
154+
155+
borrowck_cannot_reborrow_already_borrowed =
156+
cannot borrow {$is_msg_new_empty ->
157+
*[true] {$desc_new}
158+
[false] {$desc_new} (via {$msg_new})
159+
} as {$kind_new} because {$noun_old} is also borrowed as {$is_msg_old_empty ->
160+
*[true] {$kind_old}
161+
[false] {$kind_old} (via {$msg_old})
162+
}
163+
.label = {$kind_old} borrow ends here
164+
165+
borrowck_cannot_reborrow_already_uniquely_borrowed =
166+
cannot borrow {$desc_new}{$opt_via} as {$kind_new} because previous closure requires unique access
167+
.label = {$second_borrow_desc}borrow occurs here{$opt_via}
168+
.occurs_label = {$container_name} construction occurs here{$old_opt_via}
169+
.ends_label = borrow from closure ends here
170+
171+
borrowck_cannot_return_ref_to_local =
172+
cannot {$return_kind} {$reference} {$local}
173+
.label = {$return_kind}s a {$reference} data owned by the current function
174+
175+
borrowck_cannot_uniquely_borrow_by_one_closure =
176+
closure requires unique access to {$desc_new} but {$noun_old} is already borrowed{$old_opt_via}
177+
.label = {$container_name} construction occurs here{$opt_via}
178+
.occurs_label = borrow occurs here{$old_opt_via}
179+
.ends_label = borrow ends here
180+
181+
borrowck_cannot_uniquely_borrow_by_two_closures =
182+
two closures require unique access to {$desc ->
183+
[value] value
184+
*[other] {$desc}
185+
} at the same time
186+
.label = borrow from first closure ends here
187+
.new_span_label = second closure is constructed here
188+
189+
borrowck_cannot_use_static_lifetime_here =
190+
cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
191+
192+
borrowck_cannot_use_when_mutably_borrowed =
193+
cannot use {$desc ->
194+
[value] value
195+
*[other] {$desc}
196+
} because it was mutably borrowed
197+
.label = use of borrowed {$borrow_desc ->
198+
[value] value
199+
*[other] {$borrow_desc}
200+
}
201+
.borrow_span_label = {$borrow_desc ->
202+
[value] value
203+
*[other] {$borrow_desc}
204+
} is borrowed here
205+
101206
borrowck_capture_immute =
102207
capture is immutable because of use here
103208
@@ -107,6 +212,17 @@ borrowck_capture_move =
107212
borrowck_capture_mut =
108213
capture is mutable because of use here
109214
215+
borrowck_closure_borrowing_outlive_function =
216+
{$closure_kind} may outlive the current function, but it borrows {$borrowed_path}, which is owned by the current function
217+
.label = may outlive borrowed value {$borrowed_path}
218+
.path_label = {$borrowed_path} is borrowed here
219+
220+
borrowck_closure_cannot_invoke_again =
221+
closure cannot be invoked more than once because it moves the variable `{$place}` out of its environment
222+
223+
borrowck_closure_cannot_move_again =
224+
closure cannot be moved more than once as it is not `Copy` due to moving the variable `{$place}` out of its environment
225+
110226
borrowck_closure_inferred_mut = inferred to be a `FnMut` closure
111227
112228
borrowck_closure_invoked_twice =
@@ -115,30 +231,93 @@ borrowck_closure_invoked_twice =
115231
borrowck_closure_moved_twice =
116232
closure cannot be moved more than once as it is not `Copy` due to moving the variable `{$place_name}` out of its environment
117233
234+
borrowck_closures_constructed_here =
235+
closures are constructed here in different iterations of loop
236+
237+
borrowck_consider_add_lifetime_bound =
238+
consider adding the following bound: `{$fr_name}: {$outlived_fr_name}`
239+
240+
borrowck_consider_add_semicolon =
241+
consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
242+
118243
borrowck_consider_borrow_type_contents =
119244
help: consider calling `.as_ref()` or `.as_mut()` to borrow the type's contents
120245
246+
borrowck_consider_forcing_temporary_drop_sooner =
247+
the temporary is part of an expression at the end of a block;
248+
consider forcing this temporary to be dropped sooner, before the block's local variables are dropped
249+
250+
borrowck_consider_move_expression_end_of_block =
251+
for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block
252+
121253
borrowck_could_not_normalize =
122254
could not normalize `{$value}`
123255
124256
borrowck_could_not_prove =
125257
could not prove `{$predicate}`
126258
127-
borrowck_func_take_self_moved_place =
128-
`{$func}` takes ownership of the receiver `self`, which moves {$place_name}
259+
borrowck_data_moved_here =
260+
data moved here
129261
130-
borrowck_generic_does_not_live_long_enough =
131-
`{$kind}` does not live long enough
262+
borrowck_define_const_type =
263+
defining constant type: {$type_name}
132264
133-
borrowck_higher_ranked_lifetime_error =
134-
higher-ranked lifetime error
265+
borrowck_define_inline_constant_type =
266+
defining inline constant type: {$type_name}
135267
136-
borrowck_higher_ranked_subtype_error =
268+
borrowck_define_type =
269+
defining type: {$type_name}
270+
271+
borrowck_define_type_with_closure_substs =
272+
defining type: {$type_name} with closure substs {$subsets}
273+
274+
borrowck_define_type_with_generator_substs =
275+
defining type: {$type_name} with generator substs {$subsets}
276+
277+
borrowck_empty_label = {""}
278+
279+
borrowck_expects_fn_not_fnmut =
280+
expects `Fn` instead of `FnMut`
281+
282+
borrowck_expects_fnmut_not_fn =
283+
change this to accept `FnMut` instead of `Fn`
284+
285+
borrowck_first_closure_constructed_here =
286+
first closure is constructed here
287+
288+
borrowck_func_take_self_moved_place =
289+
`{$func}` takes ownership of the receiver `self`, which moves {$place_name}
290+
291+
borrowck_function_takes_self_ownership =
292+
this function takes ownership of the receiver `self`, which moves {$place_name}
293+
294+
borrowck_generic_does_not_live_long_enough =
295+
`{$kind}` does not live long enough
296+
297+
borrowck_higher_ranked_lifetime_error =
298+
higher-ranked lifetime error
299+
300+
borrowck_higher_ranked_subtype_error =
137301
higher-ranked subtype error
138302
303+
borrowck_in_this_closure =
304+
in this closure
305+
306+
borrowck_lifetime_appears_here_in_impl =
307+
lifetime `{$rg_name}` appears in the `impl`'s {$location}
308+
309+
borrowck_lifetime_appears_in_type =
310+
lifetime `{$rg_name}` appears in the type {$type_name}
311+
312+
borrowck_lifetime_appears_in_type_of =
313+
lifetime `{$rg_name}` appears in the type of `{$upvar_name}`
314+
139315
borrowck_lifetime_constraints_error =
140316
lifetime may not live long enough
141317
318+
borrowck_modify_ty_methods_help =
319+
to modify a `{$ty}`, use `.get_mut()`, `.insert()` or the entry API
320+
142321
borrowck_move_borrowed =
143322
cannot move out of `{$desc}` because it is borrowed
144323
@@ -197,13 +376,82 @@ borrowck_moved_due_to_usage_in_operator =
197376
*[false] operator
198377
}
199378
379+
borrowck_moved_var_cannot_copy =
380+
move occurs because these variables have types that don't implement the `Copy` trait
381+
382+
borrowck_mut_borrow_data_behind_const_pointer =
383+
cannot borrow data in a `*const` pointer as mutable
384+
385+
borrowck_mut_borrow_data_behind_deref =
386+
cannot borrow data in {$name} as mutable
387+
388+
borrowck_mut_borrow_data_behind_index =
389+
cannot borrow data in an index of {$name} as mutable
390+
391+
borrowck_mut_borrow_data_behind_ref =
392+
cannot borrow data in a `&` reference as mutable
393+
394+
borrowck_mut_borrow_place_declared_immute =
395+
cannot borrow {$any_place} as mutable, as it is not declared as mutable
396+
397+
borrowck_mut_borrow_place_in_pattern_guard_immute =
398+
cannot borrow {$path} as mutable, as it is immutable for the pattern guard
399+
400+
borrowck_mut_borrow_place_static =
401+
cannot borrow immutable static item {$path} as mutable
402+
403+
borrowck_mut_borrow_self_behind_const_pointer =
404+
cannot borrow {$place} as mutable, as it is behind a `*const` pointer
405+
406+
borrowck_mut_borrow_self_behind_deref =
407+
cannot borrow {$place} as mutable, as it is behind {$name}
408+
409+
borrowck_mut_borrow_self_behind_index =
410+
cannot borrow {$place} as mutable, as it is behind an index of {$name}
411+
412+
borrowck_mut_borrow_self_behind_ref =
413+
cannot borrow {$place} as mutable, as it is behind a `&` reference
414+
415+
borrowck_mut_borrow_self_in_fn =
416+
cannot borrow {$path} as mutable, as it is a captured variable in a `Fn` closure
417+
418+
borrowck_mut_borrow_symbol_declared_immute =
419+
cannot borrow {$any_place} as mutable, as `{$name}` is not declared as mutable
420+
421+
borrowck_mut_borrow_symbol_static =
422+
cannot borrow {$path} as mutable, as `{$static_name}` is an immutable static item
423+
424+
borrowck_mut_borrow_upvar_in_fn =
425+
cannot borrow {$path} as mutable, as `Fn` closures cannot mutate their captured variables
426+
427+
borrowck_mutably_borrow_multiply_loop_label =
428+
{$is_place_empty ->
429+
*[true] {$new_place_name}
430+
[false] {$new_place_name} (via {$place})
431+
} was mutably borrowed here in the previous iteration of the loop{$place}
432+
433+
borrowck_name_this_region =
434+
let's call this `{$rg_name}`
435+
436+
borrowck_non_defining_opaque_type =
437+
non-defining opaque type use in defining scope
438+
200439
borrowck_opaque_type_non_generic_param =
201440
expected generic {$kind} parameter, found `{$ty}`
202441
.label = {STREQ($ty, "'static") ->
203442
[true] cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
204443
*[other] this generic parameter must be used with a generic {$kind} parameter
205444
}
206445
446+
borrowck_outlive_constraint_need_borrow_for =
447+
{$category}requires that {$desc} is borrowed for `{$region_name}`
448+
449+
borrowck_outlive_constraint_need_borrow_lasts =
450+
{$category}requires that `{$borrow_desc}` lasts for `{$region_name}`
451+
452+
borrowck_outlive_constraint_need_borrow_lasts_for =
453+
{$category}requires that {$borrow_desc} is borrowed for `{$region_name}`
454+
207455
borrowck_partial_var_move_by_use_in_closure =
208456
variable {$is_partial ->
209457
[true] partially moved
@@ -216,14 +464,29 @@ borrowck_partial_var_move_by_use_in_generator =
216464
*[false] moved
217465
} due to use in generator
218466
467+
borrowck_path_does_not_live_long_enough =
468+
{$path} does not live long enough
469+
470+
borrowck_perhaps_save_in_new_local_to_drop =
471+
for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block
472+
473+
borrowck_require_mutable_binding =
474+
calling `{$place}` requires mutable binding due to {$reason ->
475+
[borrow] mutable borrow of `{$upvar}`
476+
*[mutation] possible mutation of `{$upvar}`
477+
}
478+
479+
borrowck_return_fnmut =
480+
change this to return `FnMut` instead of `Fn`
481+
219482
borrowck_returned_async_block_escaped =
220483
returns an `async` block that contains a reference to a captured variable, which then escapes the closure body
221484
222485
borrowck_returned_closure_escaped =
223486
returns a closure that contains a reference to a captured variable, which then escapes the closure body
224487
225488
borrowck_returned_lifetime_short =
226-
{$category_desc}requires that `{$free_region_name}` must outlive `{$outlived_fr_name}`
489+
{$category}requires that `{$free_region_name}` must outlive `{$outlived_fr_name}`
227490
228491
borrowck_returned_lifetime_wrong =
229492
{$mir_def_name} was supposed to return data with lifetime `{$outlived_fr_name}` but it is returning data with lifetime `{$fr_name}`
@@ -237,21 +500,43 @@ borrowck_suggest_create_freash_reborrow =
237500
borrowck_suggest_iterate_over_slice =
238501
consider iterating over a slice of the `{$ty}`'s content to avoid moving into the `for` loop
239502
503+
borrowck_thread_local_outlive_function =
504+
thread-local variable borrowed past end of function
505+
240506
borrowck_ty_no_impl_copy =
241507
{$is_partial_move ->
242508
[true] partial move
243509
*[false] move
244510
} occurs because {$place} has type `{$ty}`, which does not implement the `Copy` trait
245511
512+
borrowck_type_parameter_not_used_in_trait_type_alias =
513+
type parameter `{$ty}` is part of concrete type but not used in parameter list for the `impl Trait` type alias
514+
515+
borrowck_upvar_need_mut_due_to_borrow =
516+
calling `{$place}` requires mutable binding due to mutable borrow of `{$upvar}`
517+
518+
borrowck_upvar_need_mut_due_to_mutation =
519+
calling `{$place}` requires mutable binding due to possible mutation of `{$upvar}`
520+
246521
borrowck_use_due_to_use_closure =
247522
use occurs due to use in closure
248523
249524
borrowck_use_due_to_use_generator =
250525
use occurs due to use in generator
251526
527+
borrowck_used_here_by_closure =
528+
used here by closure
529+
252530
borrowck_used_impl_require_static =
253531
the used `impl` has a `'static` requirement
254532
533+
borrowck_used_non_generic_for_generic =
534+
used non-generic {$descr ->
535+
[lifetime] lifetime
536+
[type] type
537+
*[constant] constant
538+
} `{$arg}` for generic parameter
539+
255540
borrowck_value_capture_here =
256541
value captured {$is_within ->
257542
[true] here by generator
@@ -307,7 +592,6 @@ borrowck_var_here_captured = variable captured here
307592
308593
borrowck_var_here_defined = variable defined here
309594
310-
<<<<<<< master
311595
borrowck_var_move_by_use_in_closure =
312596
move occurs due to use in closure
313597
@@ -328,366 +612,6 @@ borrowck_var_second_borrow_by_use_place_in_closure =
328612
329613
borrowck_var_second_borrow_by_use_place_in_generator =
330614
second borrow occurs due to use of {$place} in generator
331-
=======
332-
borrowck_ty_no_impl_copy =
333-
{$is_partial_move ->
334-
[true] partial move
335-
*[false] move
336-
} occurs because {$place} has type `{$ty}`, which does not implement the `Copy` trait
337-
338-
borrowck_data_moved_here =
339-
data moved here
340-
341-
borrowck_and_data_moved_here = ...and here
342-
343-
borrowck_moved_var_cannot_copy =
344-
move occurs because these variables have types that don't implement the `Copy` trait
345-
346-
borrowck_used_here_by_closure =
347-
used here by closure
348-
349-
borrowck_consider_add_semicolon =
350-
consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
351-
352-
borrowck_consider_move_expression_end_of_block =
353-
for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block
354-
355-
borrowck_consider_forcing_temporary_drop_sooner =
356-
the temporary is part of an expression at the end of a block;
357-
consider forcing this temporary to be dropped sooner, before the block's local variables are dropped
358-
359-
borrowck_perhaps_save_in_new_local_to_drop =
360-
for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block
361-
362-
borrowck_outlive_constraint_need_borrow_for =
363-
{$category}requires that {$desc} is borrowed for `{$region_name}`
364-
365-
borrowck_outlive_constraint_need_borrow_lasts_for =
366-
{$category}requires that {$borrow_desc} is borrowed for `{$region_name}`
367-
368-
borrowck_consider_add_lifetime_bound =
369-
consider adding the following bound: `{$fr_name}: {$outlived_fr_name}`
370-
371-
borrowck_closure_cannot_invoke_again =
372-
closure cannot be invoked more than once because it moves the variable `{$place}` out of its environment
373-
374-
borrowck_closure_cannot_move_again =
375-
closure cannot be moved more than once as it is not `Copy` due to moving the variable `{$place}` out of its environment
376-
377-
borrowck_consider_borrow_content_of_type =
378-
help: consider calling `.as_ref()` or `.as_mut()` to borrow the type's contents
379-
380-
borrowck_function_takes_self_ownership =
381-
this function takes ownership of the receiver `self`, which moves {$place_name}
382-
383-
borrowck_outlive_constraint_need_borrow_lasts =
384-
{$category}requires that `{$borrow_desc}` lasts for `{$region_name}`
385-
386-
borrowck_require_mutable_binding =
387-
calling `{$place}` requires mutable binding due to {$reason ->
388-
[borrow] mutable borrow of `{$upvar}`
389-
*[mutation] possible mutation of `{$upvar}`
390-
}
391-
392-
borrowck_cannot_assign =
393-
cannot assign
394-
395-
borrowck_cannot_borrow_mut =
396-
cannot borrow as mutable
397-
398-
borrowck_expects_fnmut_not_fn =
399-
change this to accept `FnMut` instead of `Fn`
400-
401-
borrowck_expects_fn_not_fnmut =
402-
expects `Fn` instead of `FnMut`
403-
404-
borrowck_empty_label = {""}
405-
406-
borrowck_in_this_closure =
407-
in this closure
408-
409-
borrowck_return_fnmut =
410-
change this to return `FnMut` instead of `Fn`
411-
412-
borrowck_name_this_region =
413-
let's call this `{$rg_name}`
414-
415-
borrowck_lifetime_appears_in_type =
416-
lifetime `{$rg_name}` appears in the type {$type_name}
417-
418-
borrowck_lifetime_appears_in_type_of =
419-
lifetime `{$rg_name}` appears in the type of `{$upvar_name}`
420615
421616
borrowck_yield_type_is_type =
422617
yield type is {$type_name}
423-
424-
borrowck_lifetime_appears_here_in_impl =
425-
lifetime `{$rg_name}` appears in the `impl`'s {$location}
426-
427-
borrowck_type_parameter_not_used_in_trait_type_alias =
428-
type parameter `{$ty}` is part of concrete type but not used in parameter list for the `impl Trait` type alias
429-
430-
borrowck_non_defining_opaque_type =
431-
non-defining opaque type use in defining scope
432-
433-
borrowck_used_non_generic_for_generic =
434-
used non-generic {$descr ->
435-
[lifetime] lifetime
436-
[type] type
437-
*[constant] constant
438-
} `{$arg}` for generic parameter
439-
440-
borrowck_cannot_use_static_lifetime_here =
441-
cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
442-
443-
borrowck_define_inline_constant_type =
444-
defining inline constant type: {$type_name}
445-
446-
borrowck_define_const_type =
447-
defining constant type: {$type_name}
448-
449-
borrowck_define_type =
450-
defining type: {$type_name}
451-
452-
borrowck_define_type_with_generator_substs =
453-
defining type: {$type_name} with generator substs {$subsets}
454-
455-
borrowck_define_type_with_closure_substs =
456-
defining type: {$type_name} with closure substs {$subsets}
457-
458-
borrowck_borrowed_temporary_value_dropped =
459-
temporary value dropped while borrowed
460-
461-
borrowck_thread_local_outlive_function =
462-
thread-local variable borrowed past end of function
463-
464-
borrowck_closure_borrowing_outlive_function =
465-
{$closure_kind} may outlive the current function, but it borrows {$borrowed_path}, which is owned by the current function
466-
.label = may outlive borrowed value {$borrowed_path}
467-
.path_label = {$borrowed_path} is borrowed here
468-
469-
borrowck_cannot_return_ref_to_local =
470-
cannot {$return_kind} {$reference} {$local}
471-
.label = {$return_kind}s a {$reference} data owned by the current function
472-
473-
borrowck_path_does_not_live_long_enough =
474-
{$path} does not live long enough
475-
476-
borrowck_cannot_borrow_across_destructor =
477-
borrow may still be in use when destructor runs
478-
479-
borrowck_cannot_borrow_across_generator_yield =
480-
borrow may still be in use when generator yields
481-
.label = possible yield occurs here
482-
483-
borrowck_cannot_move_out_of_interior_of_drop =
484-
cannot move out of type `{$container_ty}`, which implements the `Drop` trait
485-
.label = cannot move out of here
486-
487-
borrowck_cannot_assign_to_borrowed =
488-
cannot assign to {$desc ->
489-
[value] value
490-
*[other] {$desc}
491-
} because it is borrowed
492-
.label = {$desc ->
493-
[value] value
494-
*[other] {$desc}
495-
} is assigned to here but it was already borrowed
496-
.borrow_here_label = {$desc ->
497-
[value] value
498-
*[other] {$desc}
499-
} is borrowed here
500-
501-
borrowck_cannot_uniquely_borrow_by_two_closures =
502-
two closures require unique access to {$desc ->
503-
[value] value
504-
*[other] {$desc}
505-
} at the same time
506-
.label = borrow from first closure ends here
507-
.new_span_label = second closure is constructed here
508-
509-
borrowck_first_closure_constructed_here =
510-
first closure is constructed here
511-
512-
borrowck_closures_constructed_here =
513-
closures are constructed here in different iterations of loop
514-
515-
borrowck_cannot_use_when_mutably_borrowed =
516-
cannot use {$desc ->
517-
[value] value
518-
*[other] {$desc}
519-
} because it was mutably borrowed
520-
.label = use of borrowed {$borrow_desc ->
521-
[value] value
522-
*[other] {$borrow_desc}
523-
}
524-
.borrow_span_label = {$borrow_desc ->
525-
[value] value
526-
*[other] {$borrow_desc}
527-
} is borrowed here
528-
529-
borrowck_cannot_mutably_borrow_multiply_same_span =
530-
cannot borrow {$is_place_empty ->
531-
*[true] {$new_place_name}
532-
[false] {$new_place_name} (via {$place})
533-
} as mutable more than once at a time
534-
.label = mutable borrow ends here
535-
536-
borrowck_mutably_borrow_multiply_loop_label =
537-
{$is_place_empty ->
538-
*[true] {$new_place_name}
539-
[false] {$new_place_name} (via {$place})
540-
} was mutably borrowed here in the previous iteration of the loop{$place}
541-
542-
borrowck_cannot_mutably_borrow_multiply =
543-
cannot borrow {$is_place_empty ->
544-
*[true] {$new_place_name}
545-
[false] {$new_place_name} (via {$place})
546-
} as mutable more than once at a time
547-
.label = first mutable borrow occurs {$is_old_place_empty ->
548-
*[true] here
549-
[false] here (via {$old_place})
550-
}
551-
.second_mut_borrow_label = second mutable borrow occurs {$is_place_empty ->
552-
*[true] here
553-
[false] here (via {$place})
554-
}
555-
.first_mut_end_label = first borrow ends here
556-
557-
borrowck_cannot_uniquely_borrow_by_one_closure =
558-
closure requires unique access to {$desc_new} but {$noun_old} is already borrowed{$old_opt_via}
559-
.label = {$container_name} construction occurs here{$opt_via}
560-
.occurs_label = borrow occurs here{$old_opt_via}
561-
.ends_label = borrow ends here
562-
563-
borrowck_cannot_reborrow_already_uniquely_borrowed =
564-
cannot borrow {$desc_new}{$opt_via} as {$kind_new} because previous closure requires unique access
565-
.label = {$second_borrow_desc}borrow occurs here{$opt_via}
566-
.occurs_label = {$container_name} construction occurs here{$old_opt_via}
567-
.ends_label = borrow from closure ends here
568-
569-
borrowck_borrow_occurs_here = {$kind} borrow occurs here
570-
571-
borrowck_borrow_occurs_here_overlap =
572-
{$kind_new} borrow of {$msg_new} -- which overlaps with {$msg_old} -- occurs here
573-
574-
borrowck_borrow_occurs_here_via =
575-
{$kind_old} borrow occurs {$is_msg_old_empty ->
576-
*[true] here
577-
[false] here (via {$msg_old})
578-
}
579-
580-
borrowck_cannot_reborrow_already_borrowed =
581-
cannot borrow {$is_msg_new_empty ->
582-
*[true] {$desc_new}
583-
[false] {$desc_new} (via {$msg_new})
584-
} as {$kind_new} because {$noun_old} is also borrowed as {$is_msg_old_empty ->
585-
*[true] {$kind_old}
586-
[false] {$kind_old} (via {$msg_old})
587-
}
588-
.label = {$kind_old} borrow ends here
589-
590-
borrowck_cannot_reassign_immutable_arg =
591-
cannot assign to immutable argument {$place}
592-
593-
borrowck_cannot_reassign_immutable_var =
594-
cannot assign twice to immutable variable {$place}
595-
596-
borrowck_modify_ty_methods_help =
597-
to modify a `{$ty}`, use `.get_mut()`, `.insert()` or the entry API
598-
599-
borrowck_upvar_need_mut_due_to_borrow =
600-
calling `{$place}` requires mutable binding due to mutable borrow of `{$upvar}`
601-
602-
borrowck_upvar_need_mut_due_to_mutation =
603-
calling `{$place}` requires mutable binding due to possible mutation of `{$upvar}`
604-
605-
borrowck_mut_borrow_place_declared_immute =
606-
cannot borrow {$any_place} as mutable, as it is not declared as mutable
607-
608-
borrowck_mut_borrow_symbol_declared_immute =
609-
cannot borrow {$any_place} as mutable, as `{$name}` is not declared as mutable
610-
611-
borrowck_mut_borrow_place_in_pattern_guard_immute =
612-
cannot borrow {$path} as mutable, as it is immutable for the pattern guard
613-
614-
borrowck_mut_borrow_place_static =
615-
cannot borrow immutable static item {$path} as mutable
616-
617-
borrowck_mut_borrow_symbol_static =
618-
cannot borrow {$path} as mutable, as `{$static_name}` is an immutable static item
619-
620-
borrowck_mut_borrow_self_in_fn =
621-
cannot borrow {$path} as mutable, as it is a captured variable in a `Fn` closure
622-
623-
borrowck_mut_borrow_upvar_in_fn =
624-
cannot borrow {$path} as mutable, as `Fn` closures cannot mutate their captured variables
625-
626-
borrowck_mut_borrow_self_behind_const_pointer =
627-
cannot borrow {$place} as mutable, as it is behind a `*const` pointer
628-
629-
borrowck_mut_borrow_self_behind_ref =
630-
cannot borrow {$place} as mutable, as it is behind a `&` reference
631-
632-
borrowck_mut_borrow_self_behind_deref =
633-
cannot borrow {$place} as mutable, as it is behind {$name}
634-
635-
borrowck_mut_borrow_self_behind_index =
636-
cannot borrow {$place} as mutable, as it is behind an index of {$name}
637-
638-
borrowck_mut_borrow_data_behind_const_pointer =
639-
cannot borrow data in a `*const` pointer as mutable
640-
641-
borrowck_mut_borrow_data_behind_ref =
642-
cannot borrow data in a `&` reference as mutable
643-
644-
borrowck_mut_borrow_data_behind_deref =
645-
cannot borrow data in {$name} as mutable
646-
647-
borrowck_mut_borrow_data_behind_index =
648-
cannot borrow data in an index of {$name} as mutable
649-
650-
borrowck_assign_place_declared_immute =
651-
cannot assign to {$any_place}, as it is not declared as mutable
652-
653-
borrowck_assign_symbol_declared_immute =
654-
cannot assign to {$any_place}, as `{$name}` is not declared as mutable
655-
656-
borrowck_assign_place_in_pattern_guard_immute =
657-
cannot assign to {$path}, as it is immutable for the pattern guard
658-
659-
borrowck_assign_place_static =
660-
cannot assign to immutable static item {$path}
661-
662-
borrowck_assign_symbol_static =
663-
cannot assign to {$path}, as `{$static_name}` is an immutable static item
664-
665-
borrowck_assign_place_in_fn =
666-
cannot assign to {$path}, as it is a captured variable in a `Fn` closure
667-
668-
borrowck_assign_upvar_in_fn =
669-
cannot assign to {$path}, as `Fn` closures cannot mutate their captured variables
670-
671-
borrowck_assign_place_behind_const_pointer =
672-
cannot assign to {$place}, which is behind a `*const` pointer
673-
674-
borrowck_assign_place_behind_ref =
675-
cannot assign to {$place}, which is behind a `&` reference
676-
677-
borrowck_assign_place_behind_deref =
678-
cannot assign to {$place}, which is behind {$name}
679-
680-
borrowck_assign_place_behind_index =
681-
cannot assign to {$place}, which is behind an index of {$ty}
682-
683-
borrowck_assign_data_behind_const_pointer =
684-
cannot assign to data in a `*const` pointer
685-
686-
borrowck_assign_data_behind_ref =
687-
cannot assign to data in a `&` reference
688-
689-
borrowck_assign_data_behind_deref =
690-
cannot assign to data in {$name}
691-
692-
borrowck_assign_data_behind_index =
693-
cannot assign to data in an index of {$name}

0 commit comments

Comments
 (0)
Please sign in to comment.