Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate another part of rustc_infer to session diagnostic #101153

Merged
merged 8 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}
davidtwco marked this conversation as resolved.
Show resolved Hide resolved

[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