]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_messages/locales/en-US/infer.ftl
Rollup merge of #106856 - vadorovsky:fix-atomic-annotations, r=joshtriplett
[rust.git] / compiler / rustc_error_messages / locales / en-US / infer.ftl
1 infer_opaque_hidden_type =
2     opaque type's hidden type cannot be another opaque type from the same scope
3     .label = one of the two opaque types used here has to be outside its defining scope
4     .opaque_type = opaque type whose hidden type is being assigned
5     .hidden_type = opaque type being used as hidden type
6
7 infer_type_annotations_needed = {$source_kind ->
8     [closure] type annotations needed for the closure `{$source_name}`
9     [normal] type annotations needed for `{$source_name}`
10     *[other] type annotations needed
11 }
12     .label = type must be known at this point
13
14 infer_label_bad = {$bad_kind ->
15     *[other] cannot infer type
16     [more_info] cannot infer {$prefix_kind ->
17         *[type] type for {$prefix}
18         [const_with_param] the value of const parameter
19         [const] the value of the constant
20     } `{$name}`{$has_parent ->
21         [true] {" "}declared on the {$parent_prefix} `{$parent_name}`
22         *[false] {""}
23     }
24 }
25
26 infer_source_kind_subdiag_let = {$kind ->
27     [with_pattern] consider giving `{$name}` an explicit type
28     [closure] consider giving this closure parameter an explicit type
29     *[other] consider giving this pattern a type
30 }{$x_kind ->
31     [has_name] , where the {$prefix_kind ->
32         *[type] type for {$prefix}
33         [const_with_param] the value of const parameter
34         [const] the value of the constant
35     } `{$arg_name}` is specified
36     [underscore] , where the placeholders `_` are specified
37     *[empty] {""}
38 }
39
40 infer_source_kind_subdiag_generic_label =
41     cannot infer {$is_type ->
42     [true] type
43     *[false] the value
44     } of the {$is_type ->
45     [true] type
46     *[false] const
47     } {$parent_exists ->
48     [true] parameter `{$param_name}` declared on the {$parent_prefix} `{$parent_name}`
49     *[false] parameter {$param_name}
50     }
51
52 infer_source_kind_subdiag_generic_suggestion =
53     consider specifying the generic {$arg_count ->
54     [one] argument
55     *[other] arguments
56     }
57
58 infer_source_kind_fully_qualified =
59     try using a fully qualified path to specify the expected types
60
61 infer_source_kind_closure_return =
62     try giving this closure an explicit return type
63
64 # generator_kind  may need to be translated
65 infer_need_type_info_in_generator =
66     type inside {$generator_kind ->
67     [async_block] `async` block
68     [async_closure] `async` closure
69     [async_fn] `async fn` body
70     *[generator] generator
71     } must be known in this context
72
73
74 infer_subtype = ...so that the {$requirement ->
75     [method_compat] method type is compatible with trait
76     [type_compat] associated type is compatible with trait
77     [const_compat] const is compatible with trait
78     [expr_assignable] expression is assignable
79     [if_else_different] `if` and `else` have incompatible types
80     [no_else] `if` missing an `else` returns `()`
81     [fn_main_correct_type] `main` function has the correct type
82     [fn_start_correct_type] #[start]` function has the correct type
83     [intristic_correct_type] intrinsic has the correct type
84     [method_correct_type] method receiver has the correct type
85     *[other] types are compatible
86 }
87 infer_subtype_2 = ...so that {$requirement ->
88     [method_compat] method type is compatible with trait
89     [type_compat] associated type is compatible with trait
90     [const_compat] const is compatible with trait
91     [expr_assignable] expression is assignable
92     [if_else_different] `if` and `else` have incompatible types
93     [no_else] `if` missing an `else` returns `()`
94     [fn_main_correct_type] `main` function has the correct type
95     [fn_start_correct_type] #[start]` function has the correct type
96     [intristic_correct_type] intrinsic has the correct type
97     [method_correct_type] method receiver has the correct type
98     *[other] types are compatible
99 }
100
101 infer_reborrow = ...so that reference does not outlive borrowed content
102 infer_reborrow_upvar = ...so that closure can access `{$name}`
103 infer_relate_object_bound = ...so that it can be closed over into an object
104 infer_reference_outlives_referent = ...so that the reference type `{$name}` does not outlive the data it points at
105 infer_relate_param_bound = ...so that the type `{$name}` will meet its required lifetime bounds{$continues ->
106     [true] ...
107     *[false] {""}
108 }
109 infer_relate_param_bound_2 = ...that is required by this bound
110 infer_relate_region_param_bound = ...so that the declared lifetime parameter bounds are satisfied
111 infer_compare_impl_item_obligation = ...so that the definition in impl matches the definition from the trait
112 infer_ascribe_user_type_prove_predicate = ...so that the where clause holds
113
114 infer_nothing = {""}
115
116 infer_lifetime_mismatch = lifetime mismatch
117
118 infer_declared_different = this parameter and the return type are declared with different lifetimes...
119 infer_data_returned = ...but data{$label_var1_exists ->
120     [true] {" "}from `{$label_var1}`
121     *[false] {""}
122 } is returned here
123
124 infer_data_lifetime_flow = ...but data with one lifetime flows into the other here
125 infer_declared_multiple = this type is declared with multiple lifetimes...
126 infer_types_declared_different = these two types are declared with different lifetimes...
127 infer_data_flows = ...but data{$label_var1_exists ->
128     [true] {" "}from `{$label_var1}`
129     *[false] -> {""}
130 } flows{$label_var2_exists ->
131     [true] {" "}into `{$label_var2}`
132     *[false] -> {""}
133 } here
134
135 infer_lifetime_param_suggestion = consider introducing a named lifetime parameter{$is_impl ->
136     [true] {" "}and update trait if needed
137     *[false] {""}
138 }
139 infer_lifetime_param_suggestion_elided = each elided lifetime in input position becomes a distinct lifetime
140
141 infer_region_explanation = {$pref_kind ->
142     *[should_not_happen] [{$pref_kind}]
143     [empty] {""}
144 }{$pref_kind ->
145     [empty] {""}
146     *[other] {" "}
147 }{$desc_kind ->
148     *[should_not_happen] [{$desc_kind}]
149     [restatic] the static lifetime
150     [revar] lifetime {$desc_arg}
151
152     [as_defined] the lifetime `{$desc_arg}` as defined here
153     [as_defined_anon] the anonymous lifetime as defined here
154     [defined_here] the anonymous lifetime defined here
155     [anon_num_here] the anonymous lifetime #{$desc_num_arg} defined here
156     [defined_here_reg] the lifetime `{$desc_arg}` as defined here
157 }{$suff_kind ->
158     *[should_not_happen] [{$suff_kind}]
159     [empty]{""}
160     [continues] ...
161 }
162
163 infer_mismatched_static_lifetime = incompatible lifetime on type
164 infer_does_not_outlive_static_from_impl = ...does not necessarily outlive the static lifetime introduced by the compatible `impl`
165 infer_implicit_static_lifetime_note = this has an implicit `'static` lifetime requirement
166 infer_implicit_static_lifetime_suggestion = consider relaxing the implicit `'static` requirement
167 infer_msl_introduces_static = introduces a `'static` lifetime requirement
168 infer_msl_unmet_req = because this has an unmet lifetime requirement
169 infer_msl_trait_note = this has an implicit `'static` lifetime requirement
170 infer_msl_trait_sugg = consider relaxing the implicit `'static` requirement
171 infer_suggest_add_let_for_letchains = consider adding `let`
172
173 infer_explicit_lifetime_required_with_ident = explicit lifetime required in the type of `{$simple_ident}`
174     .label = lifetime `{$named}` required
175
176 infer_explicit_lifetime_required_with_param_type = explicit lifetime required in parameter type
177     .label = lifetime `{$named}` required
178
179 infer_explicit_lifetime_required_sugg_with_ident = add explicit lifetime `{$named}` to the type of `{$simple_ident}`
180
181 infer_explicit_lifetime_required_sugg_with_param_type = add explicit lifetime `{$named}` to type
182
183 infer_actual_impl_expl_expected_signature_two = {$leading_ellipsis ->
184     [true] ...
185     *[false] {""}
186 }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`...
187 infer_actual_impl_expl_expected_signature_any = {$leading_ellipsis ->
188     [true] ...
189     *[false] {""}
190 }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for any lifetime `'{$lifetime_1}`...
191 infer_actual_impl_expl_expected_signature_some = {$leading_ellipsis ->
192     [true] ...
193     *[false] {""}
194 }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for some specific lifetime `'{$lifetime_1}`...
195 infer_actual_impl_expl_expected_signature_nothing = {$leading_ellipsis ->
196     [true] ...
197     *[false] {""}
198 }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`
199 infer_actual_impl_expl_expected_passive_two = {$leading_ellipsis ->
200     [true] ...
201     *[false] {""}
202 }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`...
203 infer_actual_impl_expl_expected_passive_any = {$leading_ellipsis ->
204     [true] ...
205     *[false] {""}
206 }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for any lifetime `'{$lifetime_1}`...
207 infer_actual_impl_expl_expected_passive_some = {$leading_ellipsis ->
208     [true] ...
209     *[false] {""}
210 }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for some specific lifetime `'{$lifetime_1}`...
211 infer_actual_impl_expl_expected_passive_nothing = {$leading_ellipsis ->
212     [true] ...
213     *[false] {""}
214 }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`
215 infer_actual_impl_expl_expected_other_two = {$leading_ellipsis ->
216     [true] ...
217     *[false] {""}
218 }`{$ty_or_sig}` must implement `{$trait_path}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`...
219 infer_actual_impl_expl_expected_other_any = {$leading_ellipsis ->
220     [true] ...
221     *[false] {""}
222 }`{$ty_or_sig}` must implement `{$trait_path}`, for any lifetime `'{$lifetime_1}`...
223 infer_actual_impl_expl_expected_other_some = {$leading_ellipsis ->
224     [true] ...
225     *[false] {""}
226 }`{$ty_or_sig}` must implement `{$trait_path}`, for some specific lifetime `'{$lifetime_1}`...
227 infer_actual_impl_expl_expected_other_nothing = {$leading_ellipsis ->
228     [true] ...
229     *[false] {""}
230 }`{$ty_or_sig}` must implement `{$trait_path}`
231
232 infer_actual_impl_expl_but_actually_implements_trait = ...but it actually implements `{$trait_path}`{$has_lifetime ->
233     [true] , for some specific lifetime `'{$lifetime}`
234     *[false] {""}
235 }
236 infer_actual_impl_expl_but_actually_implemented_for_ty = ...but `{$trait_path}` is actually implemented for the type `{$ty}`{$has_lifetime ->
237     [true] , for some specific lifetime `'{$lifetime}`
238     *[false] {""}
239 }
240 infer_actual_impl_expl_but_actually_ty_implements = ...but `{$ty}` actually implements `{$trait_path}`{$has_lifetime ->
241     [true] , for some specific lifetime `'{$lifetime}`
242     *[false] {""}
243 }
244
245 infer_trait_placeholder_mismatch = implementation of `{$trait_def_id}` is not general enough
246     .label_satisfy = doesn't satisfy where-clause
247     .label_where = due to a where-clause on `{$def_id}`...
248     .label_dup = implementation of `{$trait_def_id}` is not general enough
249
250 infer_trait_impl_diff = `impl` item signature doesn't match `trait` item signature
251     .found = found `{$found}`
252     .expected = expected `{$expected}`
253     .expected_found = expected signature `{$expected}`
254                {"   "}found signature `{$found}`
255
256 infer_tid_rel_help = verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
257 infer_tid_consider_borrowing = consider borrowing this type parameter in the trait
258 infer_tid_param_help = the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
259
260 infer_dtcs_has_lifetime_req_label = this has an implicit `'static` lifetime requirement
261 infer_dtcs_introduces_requirement = calling this method introduces the `impl`'s 'static` requirement
262 infer_dtcs_has_req_note = the used `impl` has a `'static` requirement
263 infer_dtcs_suggestion = consider relaxing the implicit `'static` requirement
264
265 infer_but_calling_introduces = {$has_param_name ->
266     [true] `{$param_name}`
267     *[false] `fn` parameter
268 } has {$lifetime_kind ->
269     [true] lifetime `{$lifetime}`
270     *[false] an anonymous lifetime `'_`
271 } but calling `{$assoc_item}` introduces an implicit `'static` lifetime requirement
272     .label1 = {$has_lifetime ->
273         [true] lifetime `{$lifetime}`
274         *[false] an anonymous lifetime `'_`
275     }
276     .label2 = ...is used and required to live as long as `'static` here because of an implicit lifetime bound on the {$has_impl_path ->
277         [true] `impl` of `{$impl_path}`
278         *[false] inherent `impl`
279     }
280
281 infer_but_needs_to_satisfy = {$has_param_name ->
282     [true] `{$param_name}`
283     *[false] `fn` parameter
284 } has {$has_lifetime ->
285     [true] lifetime `{$lifetime}`
286     *[false] an anonymous lifetime `'_`
287 } but it needs to satisfy a `'static` lifetime requirement
288     .influencer = this data with {$has_lifetime ->
289         [true] lifetime `{$lifetime}`
290         *[false] an anonymous lifetime `'_`
291     }...
292     .require = {$spans_empty ->
293         *[true] ...is used and required to live as long as `'static` here
294         [false] ...and is required to live as long as `'static` here
295     }
296     .used_here = ...is used here...
297     .introduced_by_bound = 'static` lifetime requirement introduced by this bound
298
299 infer_more_targeted = {$has_param_name ->
300     [true] `{$param_name}`
301     *[false] `fn` parameter
302 } has {$has_lifetime ->
303     [true] lifetime `{$lifetime}`
304     *[false] an anonymous lifetime `'_`
305 } but calling `{$ident}` introduces an implicit `'static` lifetime requirement
306
307 infer_ril_introduced_here = `'static` requirement introduced here
308 infer_ril_introduced_by = requirement introduced by this return type
309 infer_ril_because_of = because of this returned expression
310 infer_ril_static_introduced_by = "`'static` lifetime requirement introduced by the return type