Skip to content

Commit

Permalink
Rollup merge of #101153 - IntQuant:issue-100717-infer-2, r=davidtwco
Browse files Browse the repository at this point in the history
Migrate another part of rustc_infer to session diagnostic

Probably will migrate another file before marking this one as ready-to-merge.

`@rustbot` label +A-translation
r? rust-lang/diagnostics
cc #100717
  • Loading branch information
Dylan-DPC authored Sep 8, 2022
2 parents 4af35b8 + 3d70be7 commit e3ea800
Show file tree
Hide file tree
Showing 7 changed files with 805 additions and 397 deletions.
62 changes: 60 additions & 2 deletions compiler/rustc_error_messages/locales/en-US/infer.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,67 @@ infer_relate_object_bound = ...so that it can be closed over into an object
infer_data_borrowed = ...so that the type `{$name}` is not borrowed for too long
infer_reference_outlives_referent = ...so that the reference type `{$name}` does not outlive the data it points at
infer_relate_param_bound = ...so that the type `{$name}` will meet its required lifetime bounds{$continues ->
[true] ...
*[false] {""}
[true] ...
*[false] {""}
}
infer_relate_param_bound_2 = ...that is required by this bound
infer_relate_region_param_bound = ...so that the declared lifetime parameter bounds are satisfied
infer_compare_impl_item_obligation = ...so that the definition in impl matches the definition from the trait
infer_nothing = {""}
infer_lifetime_mismatch = lifetime mismatch
infer_declared_different = this parameter and the return type are declared with different lifetimes...
infer_data_returned = ...but data{$label_var1_exists ->
[true] {" "}from `{$label_var1}`
*[false] {""}
} is returned here
infer_data_lifetime_flow = ...but data with one lifetime flows into the other here
infer_declared_multiple = this type is declared with multiple lifetimes...
infer_types_declared_different = these two types are declared with different lifetimes...
infer_data_flows = ...but data{$label_var1_exists ->
[true] -> {" "}from `{$label_var1}`
*[false] -> {""}
} flows{$label_var2_exists ->
[true] -> {" "}into `{$label_var2}`
*[false] -> {""}
} here
infer_lifetime_param_suggestion = consider introducing a named lifetime parameter{$is_impl ->
[true] {" "}and update trait if needed
*[false] {""}
}
infer_lifetime_param_suggestion_elided = each elided lifetime in input position becomes a distinct lifetime
infer_region_explanation = {$pref_kind ->
*[should_not_happen] [{$pref_kind}]
[empty] {""}
}{$pref_kind ->
[empty] {""}
*[other] {" "}
}{$desc_kind ->
*[should_not_happen] [{$desc_kind}]
[restatic] the static lifetime
[reempty] the empty lifetime
[reemptyuni] the empty lifetime in universe {$desc_arg}
[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
[anon_num_here] the anonymous lifetime #{$desc_num_arg} defined here
[defined_here_reg] the lifetime `{$desc_arg}` as defined here
}{$suff_kind ->
*[should_not_happen] [{$suff_kind}]
[empty]{""}
[continues] ...
}
infer_mismatched_static_lifetime = incompatible lifetime on type
infer_msl_impl_note = ...does not necessarily outlive the static lifetime introduced by the compatible `impl`
infer_msl_introduces_static = introduces a `'static` lifetime requirement
infer_msl_unmet_req = because this has an unmet lifetime requirement
infer_msl_trait_note = this has an implicit `'static` lifetime requirement
infer_msl_trait_sugg = consider relaxing the implicit `'static` requirement
254 changes: 0 additions & 254 deletions compiler/rustc_infer/src/errors.rs

This file was deleted.

Loading

0 comments on commit e3ea800

Please sign in to comment.