Port "BorrowedTooLong" diagnostic
This commit is contained in:
parent
8fc5ba65e1
commit
58e901b6fd
4 changed files with 45 additions and 7 deletions
|
@ -142,12 +142,14 @@ infer_region_explanation = {$pref_kind ->
|
|||
*[should_not_happen] [{$pref_kind}]
|
||||
[ref_valid_for] ...the reference is valid for
|
||||
[content_valid_for] ...but the borrowed content is only valid for
|
||||
[type_valid_for] object type is valid for
|
||||
[type_obj_valid_for] object type is valid for
|
||||
[source_pointer_valid_for] source pointer is only valid for
|
||||
[type_satisfy] type must satisfy
|
||||
[type_outlive] type must outlive
|
||||
[lf_instantiated_with] lifetime parameter instantiated with
|
||||
[lf_must_outlive] but lifetime parameter must outlive
|
||||
[type_valid_for] the type is valid for
|
||||
[borrow_lasts_for] but the borrow lasts for
|
||||
[empty] {""}
|
||||
}{$pref_kind ->
|
||||
[empty] {""}
|
||||
|
@ -156,7 +158,6 @@ infer_region_explanation = {$pref_kind ->
|
|||
*[should_not_happen] [{$desc_kind}]
|
||||
[restatic] the static lifetime
|
||||
[revar] lifetime {$desc_arg}
|
||||
|
||||
[as_defined] the lifetime `{$desc_arg}` as defined here
|
||||
[as_defined_anon] the anonymous lifetime as defined here
|
||||
[defined_here] the anonymous lifetime defined here
|
||||
|
@ -173,6 +174,7 @@ infer_outlives_content = lifetime of reference outlives lifetime of borrowed con
|
|||
infer_outlives_bound = lifetime of the source pointer does not outlive lifetime bound of the object type
|
||||
infer_fullfill_req_lifetime = the type `{$ty}` does not fulfill the required lifetime
|
||||
infer_lf_bound_not_satisfied = lifetime bound not satisfied
|
||||
infer_borrowed_too_long = a value of type `{$ty}` is borrowed for too long
|
||||
|
||||
infer_mismatched_static_lifetime = incompatible lifetime on type
|
||||
infer_does_not_outlive_static_from_impl = ...does not necessarily outlive the static lifetime introduced by the compatible `impl`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue