2022-08-17 09:45:35 +00:00
|
|
|
borrowck_assign_due_to_use_closure =
|
2022-08-26 02:32:59 +00:00
|
|
|
assignment occurs due to use in closure
|
2022-11-04 09:09:14 +00:00
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
borrowck_assign_due_to_use_coroutine =
|
|
|
|
assign occurs due to use in coroutine
|
2022-11-04 09:09:14 +00:00
|
|
|
|
|
|
|
borrowck_assign_part_due_to_use_closure =
|
2023-02-10 09:48:45 +00:00
|
|
|
assignment to part occurs due to use in closure
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
borrowck_assign_part_due_to_use_coroutine =
|
|
|
|
assign to part occurs due to use in coroutine
|
2022-11-04 09:09:14 +00:00
|
|
|
|
|
|
|
borrowck_borrow_due_to_use_closure =
|
|
|
|
borrow occurs due to use in closure
|
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
borrowck_borrow_due_to_use_coroutine =
|
|
|
|
borrow occurs due to use in coroutine
|
2022-11-04 09:09:14 +00:00
|
|
|
|
2024-03-12 17:21:15 +00:00
|
|
|
borrowck_calling_operator_moves =
|
|
|
|
calling this operator moves the value
|
|
|
|
|
2022-11-04 09:09:14 +00:00
|
|
|
borrowck_calling_operator_moves_lhs =
|
2023-02-10 09:48:45 +00:00
|
|
|
calling this operator moves the left-hand side
|
2022-11-04 09:09:14 +00:00
|
|
|
|
|
|
|
borrowck_cannot_move_when_borrowed =
|
2023-02-10 09:48:45 +00:00
|
|
|
cannot move out of {$place ->
|
|
|
|
[value] value
|
2022-11-09 12:57:44 +00:00
|
|
|
*[other] {$place}
|
2023-02-10 09:48:45 +00:00
|
|
|
} because it is borrowed
|
2022-11-09 12:57:44 +00:00
|
|
|
.label = borrow of {$borrow_place ->
|
|
|
|
[value] value
|
|
|
|
*[other] {$borrow_place}
|
2023-02-10 09:48:45 +00:00
|
|
|
} occurs here
|
2022-11-09 12:57:44 +00:00
|
|
|
.move_label = move out of {$value_place ->
|
|
|
|
[value] value
|
|
|
|
*[other] {$value_place}
|
2023-02-10 09:48:45 +00:00
|
|
|
} occurs here
|
2022-11-09 12:56:28 +00:00
|
|
|
|
|
|
|
borrowck_capture_immute =
|
|
|
|
capture is immutable because of use here
|
|
|
|
|
|
|
|
borrowck_capture_move =
|
|
|
|
capture is moved because of use here
|
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_capture_mut =
|
|
|
|
capture is mutable because of use here
|
|
|
|
|
|
|
|
borrowck_closure_inferred_mut = inferred to be a `FnMut` closure
|
|
|
|
|
|
|
|
borrowck_closure_invoked_twice =
|
|
|
|
closure cannot be invoked more than once because it moves the variable `{$place_name}` out of its environment
|
|
|
|
|
2022-11-09 12:56:28 +00:00
|
|
|
borrowck_closure_moved_twice =
|
|
|
|
closure cannot be moved more than once as it is not `Copy` due to moving the variable `{$place_name}` out of its environment
|
|
|
|
|
|
|
|
borrowck_consider_borrow_type_contents =
|
|
|
|
help: consider calling `.as_ref()` or `.as_mut()` to borrow the type's contents
|
2022-11-09 12:57:44 +00:00
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_could_not_normalize =
|
|
|
|
could not normalize `{$value}`
|
|
|
|
|
|
|
|
borrowck_could_not_prove =
|
|
|
|
could not prove `{$predicate}`
|
|
|
|
|
2024-08-08 20:54:09 +00:00
|
|
|
borrowck_dereference_suggestion =
|
|
|
|
dereference the return value
|
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_func_take_self_moved_place =
|
|
|
|
`{$func}` takes ownership of the receiver `self`, which moves {$place_name}
|
|
|
|
|
|
|
|
borrowck_generic_does_not_live_long_enough =
|
|
|
|
`{$kind}` does not live long enough
|
|
|
|
|
|
|
|
borrowck_higher_ranked_lifetime_error =
|
|
|
|
higher-ranked lifetime error
|
|
|
|
|
|
|
|
borrowck_higher_ranked_subtype_error =
|
|
|
|
higher-ranked subtype error
|
|
|
|
|
2024-08-08 21:21:00 +00:00
|
|
|
borrowck_implicit_static =
|
|
|
|
this has an implicit `'static` lifetime requirement
|
|
|
|
|
|
|
|
borrowck_implicit_static_introduced =
|
|
|
|
calling this method introduces the `impl`'s `'static` requirement
|
|
|
|
|
|
|
|
borrowck_implicit_static_relax =
|
|
|
|
consider relaxing the implicit `'static` requirement
|
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_lifetime_constraints_error =
|
|
|
|
lifetime may not live long enough
|
|
|
|
|
2024-08-08 21:12:41 +00:00
|
|
|
borrowck_limitations_implies_static =
|
|
|
|
due to current limitations in the borrow checker, this implies a `'static` lifetime
|
|
|
|
|
2024-08-08 20:58:42 +00:00
|
|
|
borrowck_move_closure_suggestion =
|
|
|
|
consider adding 'move' keyword before the nested closure
|
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_move_out_place_here =
|
|
|
|
{$place} is moved here
|
|
|
|
|
2022-11-09 12:57:44 +00:00
|
|
|
borrowck_move_unsized =
|
|
|
|
cannot move a value of type `{$ty}`
|
|
|
|
.label = the size of `{$ty}` cannot be statically determined
|
2023-01-16 15:15:09 +00:00
|
|
|
|
|
|
|
borrowck_moved_a_fn_once_in_call =
|
2023-01-17 08:21:34 +00:00
|
|
|
this value implements `FnOnce`, which causes it to be moved when called
|
2023-02-24 05:26:27 +00:00
|
|
|
|
2024-03-15 18:08:12 +00:00
|
|
|
borrowck_moved_a_fn_once_in_call_call =
|
|
|
|
`FnOnce` closures can only be called once
|
|
|
|
|
|
|
|
borrowck_moved_a_fn_once_in_call_def =
|
|
|
|
`{$ty}` is made to be an `FnOnce` closure here
|
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_moved_due_to_await =
|
|
|
|
{$place_name} {$is_partial ->
|
|
|
|
[true] partially moved
|
|
|
|
*[false] moved
|
|
|
|
} due to this {$is_loop_message ->
|
|
|
|
[true] await, in previous iteration of loop
|
|
|
|
*[false] await
|
|
|
|
}
|
|
|
|
|
|
|
|
borrowck_moved_due_to_call =
|
|
|
|
{$place_name} {$is_partial ->
|
|
|
|
[true] partially moved
|
|
|
|
*[false] moved
|
|
|
|
} due to this {$is_loop_message ->
|
|
|
|
[true] call, in previous iteration of loop
|
|
|
|
*[false] call
|
|
|
|
}
|
|
|
|
|
|
|
|
borrowck_moved_due_to_implicit_into_iter_call =
|
|
|
|
{$place_name} {$is_partial ->
|
|
|
|
[true] partially moved
|
|
|
|
*[false] moved
|
|
|
|
} due to this implicit call to {$is_loop_message ->
|
|
|
|
[true] `.into_iter()`, in previous iteration of loop
|
|
|
|
*[false] `.into_iter()`
|
|
|
|
}
|
|
|
|
|
|
|
|
borrowck_moved_due_to_method_call =
|
|
|
|
{$place_name} {$is_partial ->
|
|
|
|
[true] partially moved
|
|
|
|
*[false] moved
|
|
|
|
} due to this method {$is_loop_message ->
|
|
|
|
[true] call, in previous iteration of loop
|
|
|
|
*[false] call
|
|
|
|
}
|
|
|
|
|
2023-04-25 19:48:59 +00:00
|
|
|
borrowck_moved_due_to_usage_in_operator =
|
|
|
|
{$place_name} {$is_partial ->
|
|
|
|
[true] partially moved
|
|
|
|
*[false] moved
|
|
|
|
} due to usage in {$is_loop_message ->
|
|
|
|
[true] operator, in previous iteration of loop
|
2023-01-17 08:21:34 +00:00
|
|
|
*[false] operator
|
2023-05-23 01:51:25 +00:00
|
|
|
}
|
|
|
|
|
2023-10-19 08:26:32 +00:00
|
|
|
borrowck_opaque_type_lifetime_mismatch =
|
|
|
|
opaque type used twice with different lifetimes
|
|
|
|
.label = lifetime `{$arg}` used here
|
|
|
|
.prev_lifetime_label = lifetime `{$prev}` previously used here
|
|
|
|
.note = if all non-lifetime generic parameters are the same, but the lifetime parameters differ, it is not possible to differentiate the opaque types
|
|
|
|
|
2023-01-16 15:15:09 +00:00
|
|
|
borrowck_opaque_type_non_generic_param =
|
|
|
|
expected generic {$kind} parameter, found `{$ty}`
|
2023-01-17 08:21:34 +00:00
|
|
|
.label = {STREQ($ty, "'static") ->
|
|
|
|
[true] cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
|
2023-04-25 19:48:59 +00:00
|
|
|
*[other] this generic parameter must be used with a generic {$kind} parameter
|
2023-05-23 01:51:25 +00:00
|
|
|
}
|
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_partial_var_move_by_use_in_closure =
|
|
|
|
variable {$is_partial ->
|
|
|
|
[true] partially moved
|
|
|
|
*[false] moved
|
2022-11-04 09:09:14 +00:00
|
|
|
} due to use in closure
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
borrowck_partial_var_move_by_use_in_coroutine =
|
2023-02-24 05:26:27 +00:00
|
|
|
variable {$is_partial ->
|
|
|
|
[true] partially moved
|
|
|
|
*[false] moved
|
2023-10-19 21:46:28 +00:00
|
|
|
} due to use in coroutine
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2024-08-08 21:12:41 +00:00
|
|
|
borrowck_restrict_to_static =
|
|
|
|
consider restricting the type parameter to the `'static` lifetime
|
|
|
|
|
2022-08-26 02:32:59 +00:00
|
|
|
borrowck_returned_async_block_escaped =
|
2023-04-25 19:48:59 +00:00
|
|
|
returns an `async` block that contains a reference to a captured variable, which then escapes the closure body
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2022-08-26 02:32:59 +00:00
|
|
|
borrowck_returned_closure_escaped =
|
2023-04-25 19:48:59 +00:00
|
|
|
returns a closure that contains a reference to a captured variable, which then escapes the closure body
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2022-08-26 02:32:59 +00:00
|
|
|
borrowck_returned_lifetime_short =
|
|
|
|
{$category_desc}requires that `{$free_region_name}` must outlive `{$outlived_fr_name}`
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2022-08-26 02:32:59 +00:00
|
|
|
borrowck_returned_lifetime_wrong =
|
2023-04-25 19:48:59 +00:00
|
|
|
{$mir_def_name} was supposed to return data with lifetime `{$outlived_fr_name}` but it is returning data with lifetime `{$fr_name}`
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2022-08-26 02:32:59 +00:00
|
|
|
borrowck_returned_ref_escaped =
|
|
|
|
returns a reference to a captured variable which escapes the closure body
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2024-02-17 08:57:24 +00:00
|
|
|
borrowck_simd_intrinsic_arg_const =
|
|
|
|
{$arg ->
|
|
|
|
[1] 1st
|
|
|
|
[2] 2nd
|
|
|
|
[3] 3rd
|
|
|
|
*[other] {$arg}th
|
|
|
|
} argument of `{$intrinsic}` is required to be a `const` item
|
2023-09-06 09:38:15 +00:00
|
|
|
|
2024-09-04 23:03:47 +00:00
|
|
|
borrowck_suggest_create_fresh_reborrow =
|
2023-02-24 05:26:27 +00:00
|
|
|
consider reborrowing the `Pin` instead of moving it
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_suggest_iterate_over_slice =
|
2023-04-25 19:48:59 +00:00
|
|
|
consider iterating over a slice of the `{$ty}`'s content to avoid moving into the `for` loop
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_ty_no_impl_copy =
|
|
|
|
{$is_partial_move ->
|
|
|
|
[true] partial move
|
2023-04-25 19:48:59 +00:00
|
|
|
*[false] move
|
2023-02-24 05:26:27 +00:00
|
|
|
} occurs because {$place} has type `{$ty}`, which does not implement the `Copy` trait
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2022-11-04 09:09:14 +00:00
|
|
|
borrowck_use_due_to_use_closure =
|
|
|
|
use occurs due to use in closure
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
borrowck_use_due_to_use_coroutine =
|
|
|
|
use occurs due to use in coroutine
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2022-08-26 02:32:59 +00:00
|
|
|
borrowck_used_impl_require_static =
|
|
|
|
the used `impl` has a `'static` requirement
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_value_capture_here =
|
|
|
|
value captured {$is_within ->
|
2023-10-19 21:46:28 +00:00
|
|
|
[true] here by coroutine
|
2023-02-24 05:26:27 +00:00
|
|
|
*[false] here
|
2023-04-25 19:48:59 +00:00
|
|
|
}
|
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_value_moved_here =
|
|
|
|
value {$is_partial ->
|
|
|
|
[true] partially moved
|
|
|
|
*[false] moved
|
|
|
|
} {$is_move_msg ->
|
|
|
|
[true] into closure here
|
|
|
|
*[false] here
|
|
|
|
}{$is_loop_message ->
|
|
|
|
[true] , in previous iteration of loop
|
|
|
|
*[false] {""}
|
|
|
|
}
|
|
|
|
|
|
|
|
borrowck_var_borrow_by_use_in_closure =
|
|
|
|
borrow occurs due to use in closure
|
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
borrowck_var_borrow_by_use_in_coroutine =
|
|
|
|
borrow occurs due to use in coroutine
|
2023-02-24 05:26:27 +00:00
|
|
|
|
|
|
|
borrowck_var_borrow_by_use_place_in_closure =
|
|
|
|
{$is_single_var ->
|
|
|
|
*[true] borrow occurs
|
|
|
|
[false] borrows occur
|
|
|
|
} due to use of {$place} in closure
|
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
borrowck_var_borrow_by_use_place_in_coroutine =
|
2023-02-24 05:26:27 +00:00
|
|
|
{$is_single_var ->
|
|
|
|
*[true] borrow occurs
|
|
|
|
[false] borrows occur
|
2023-10-19 21:46:28 +00:00
|
|
|
} due to use of {$place} in coroutine
|
2023-02-24 05:26:27 +00:00
|
|
|
|
|
|
|
borrowck_var_cannot_escape_closure =
|
|
|
|
captured variable cannot escape `FnMut` closure body
|
|
|
|
.note = `FnMut` closures only have access to their captured variables while they are executing...
|
|
|
|
.cannot_escape = ...therefore, they cannot allow references to captured variables to escape
|
|
|
|
|
|
|
|
borrowck_var_does_not_need_mut =
|
|
|
|
variable does not need to be mutable
|
|
|
|
.suggestion = remove this `mut`
|
|
|
|
|
|
|
|
borrowck_var_first_borrow_by_use_place_in_closure =
|
|
|
|
first borrow occurs due to use of {$place} in closure
|
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
borrowck_var_first_borrow_by_use_place_in_coroutine =
|
|
|
|
first borrow occurs due to use of {$place} in coroutine
|
2023-02-24 05:26:27 +00:00
|
|
|
|
|
|
|
borrowck_var_here_captured = variable captured here
|
|
|
|
|
|
|
|
borrowck_var_here_defined = variable defined here
|
|
|
|
|
|
|
|
borrowck_var_move_by_use_in_closure =
|
|
|
|
move occurs due to use in closure
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
borrowck_var_move_by_use_in_coroutine =
|
|
|
|
move occurs due to use in coroutine
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_var_mutable_borrow_by_use_place_in_closure =
|
|
|
|
mutable borrow occurs due to use of {$place} in closure
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2023-02-24 05:26:27 +00:00
|
|
|
borrowck_var_second_borrow_by_use_place_in_closure =
|
|
|
|
second borrow occurs due to use of {$place} in closure
|
2023-05-23 01:51:25 +00:00
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
borrowck_var_second_borrow_by_use_place_in_coroutine =
|
|
|
|
second borrow occurs due to use of {$place} in coroutine
|