]>
Commit | Line | Data |
---|---|---|
49aad941 FG |
1 | infer_actual_impl_expl_but_actually_implemented_for_ty = ...but `{$trait_path}` is actually implemented for the type `{$ty}`{$has_lifetime -> |
2 | [true] , for some specific lifetime `'{$lifetime}` | |
f2b60f7d FG |
3 | *[false] {""} |
4 | } | |
49aad941 FG |
5 | infer_actual_impl_expl_but_actually_implements_trait = ...but it actually implements `{$trait_path}`{$has_lifetime -> |
6 | [true] , for some specific lifetime `'{$lifetime}` | |
f2b60f7d FG |
7 | *[false] {""} |
8 | } | |
49aad941 FG |
9 | infer_actual_impl_expl_but_actually_ty_implements = ...but `{$ty}` actually implements `{$trait_path}`{$has_lifetime -> |
10 | [true] , for some specific lifetime `'{$lifetime}` | |
11 | *[false] {""} | |
f2b60f7d FG |
12 | } |
13 | ||
49aad941 | 14 | infer_actual_impl_expl_expected_other_any = {$leading_ellipsis -> |
9c376795 FG |
15 | [true] ... |
16 | *[false] {""} | |
49aad941 FG |
17 | }`{$ty_or_sig}` must implement `{$trait_path}`, for any lifetime `'{$lifetime_1}`... |
18 | infer_actual_impl_expl_expected_other_nothing = {$leading_ellipsis -> | |
9c376795 FG |
19 | [true] ... |
20 | *[false] {""} | |
49aad941 FG |
21 | }`{$ty_or_sig}` must implement `{$trait_path}` |
22 | ||
23 | infer_actual_impl_expl_expected_other_some = {$leading_ellipsis -> | |
9c376795 FG |
24 | [true] ... |
25 | *[false] {""} | |
49aad941 FG |
26 | }`{$ty_or_sig}` must implement `{$trait_path}`, for some specific lifetime `'{$lifetime_1}`... |
27 | infer_actual_impl_expl_expected_other_two = {$leading_ellipsis -> | |
9c376795 FG |
28 | [true] ... |
29 | *[false] {""} | |
49aad941 | 30 | }`{$ty_or_sig}` must implement `{$trait_path}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`... |
9c376795 FG |
31 | infer_actual_impl_expl_expected_passive_any = {$leading_ellipsis -> |
32 | [true] ... | |
33 | *[false] {""} | |
34 | }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for any lifetime `'{$lifetime_1}`... | |
49aad941 FG |
35 | infer_actual_impl_expl_expected_passive_nothing = {$leading_ellipsis -> |
36 | [true] ... | |
37 | *[false] {""} | |
38 | }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}` | |
9c376795 FG |
39 | infer_actual_impl_expl_expected_passive_some = {$leading_ellipsis -> |
40 | [true] ... | |
41 | *[false] {""} | |
42 | }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for some specific lifetime `'{$lifetime_1}`... | |
49aad941 | 43 | infer_actual_impl_expl_expected_passive_two = {$leading_ellipsis -> |
9c376795 FG |
44 | [true] ... |
45 | *[false] {""} | |
49aad941 FG |
46 | }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`... |
47 | infer_actual_impl_expl_expected_signature_any = {$leading_ellipsis -> | |
9c376795 FG |
48 | [true] ... |
49 | *[false] {""} | |
49aad941 FG |
50 | }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for any lifetime `'{$lifetime_1}`... |
51 | infer_actual_impl_expl_expected_signature_nothing = {$leading_ellipsis -> | |
9c376795 FG |
52 | [true] ... |
53 | *[false] {""} | |
49aad941 FG |
54 | }closure with signature `{$ty_or_sig}` must implement `{$trait_path}` |
55 | infer_actual_impl_expl_expected_signature_some = {$leading_ellipsis -> | |
9c376795 FG |
56 | [true] ... |
57 | *[false] {""} | |
49aad941 FG |
58 | }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for some specific lifetime `'{$lifetime_1}`... |
59 | infer_actual_impl_expl_expected_signature_two = {$leading_ellipsis -> | |
9c376795 FG |
60 | [true] ... |
61 | *[false] {""} | |
49aad941 FG |
62 | }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`... |
63 | infer_ascribe_user_type_prove_predicate = ...so that the where clause holds | |
9c376795 | 64 | |
49aad941 FG |
65 | infer_await_both_futures = consider `await`ing on both `Future`s |
66 | infer_await_future = consider `await`ing on the `Future` | |
67 | infer_await_note = calling an async function returns a future | |
9c376795 | 68 | |
49aad941 | 69 | infer_borrowed_too_long = a value of type `{$ty}` is borrowed for too long |
9c376795 FG |
70 | infer_but_calling_introduces = {$has_param_name -> |
71 | [true] `{$param_name}` | |
72 | *[false] `fn` parameter | |
73 | } has {$lifetime_kind -> | |
9ffffee4 FG |
74 | [true] lifetime `{$lifetime}` |
75 | *[false] an anonymous lifetime `'_` | |
76 | } but calling `{$assoc_item}` introduces an implicit `'static` lifetime requirement | |
9c376795 | 77 | .label1 = {$has_lifetime -> |
9ffffee4 FG |
78 | [true] lifetime `{$lifetime}` |
79 | *[false] an anonymous lifetime `'_` | |
9c376795 FG |
80 | } |
81 | .label2 = ...is used and required to live as long as `'static` here because of an implicit lifetime bound on the {$has_impl_path -> | |
9ffffee4 FG |
82 | [true] `impl` of `{$impl_path}` |
83 | *[false] inherent `impl` | |
9c376795 FG |
84 | } |
85 | ||
86 | infer_but_needs_to_satisfy = {$has_param_name -> | |
87 | [true] `{$param_name}` | |
88 | *[false] `fn` parameter | |
89 | } has {$has_lifetime -> | |
9ffffee4 FG |
90 | [true] lifetime `{$lifetime}` |
91 | *[false] an anonymous lifetime `'_` | |
9c376795 FG |
92 | } but it needs to satisfy a `'static` lifetime requirement |
93 | .influencer = this data with {$has_lifetime -> | |
9ffffee4 FG |
94 | [true] lifetime `{$lifetime}` |
95 | *[false] an anonymous lifetime `'_` | |
9c376795 FG |
96 | }... |
97 | .require = {$spans_empty -> | |
98 | *[true] ...is used and required to live as long as `'static` here | |
99 | [false] ...and is required to live as long as `'static` here | |
100 | } | |
101 | .used_here = ...is used here... | |
9ffffee4 | 102 | .introduced_by_bound = `'static` lifetime requirement introduced by this bound |
9c376795 | 103 | |
49aad941 FG |
104 | infer_compare_impl_item_obligation = ...so that the definition in impl matches the definition from the trait |
105 | infer_consider_specifying_length = consider specifying the actual array length | |
106 | infer_data_flows = ...but data{$label_var1_exists -> | |
107 | [true] {" "}from `{$label_var1}` | |
108 | *[false] -> {""} | |
109 | } flows{$label_var2_exists -> | |
110 | [true] {" "}into `{$label_var2}` | |
111 | *[false] -> {""} | |
112 | } here | |
113 | ||
114 | infer_data_lifetime_flow = ...but data with one lifetime flows into the other here | |
115 | infer_data_returned = ...but data{$label_var1_exists -> | |
116 | [true] {" "}from `{$label_var1}` | |
117 | *[false] {""} | |
118 | } is returned here | |
119 | ||
120 | infer_declared_different = this parameter and the return type are declared with different lifetimes... | |
121 | infer_declared_multiple = this type is declared with multiple lifetimes... | |
122 | infer_does_not_outlive_static_from_impl = ...does not necessarily outlive the static lifetime introduced by the compatible `impl` | |
123 | infer_dtcs_has_lifetime_req_label = this has an implicit `'static` lifetime requirement | |
124 | infer_dtcs_has_req_note = the used `impl` has a `'static` requirement | |
125 | infer_dtcs_introduces_requirement = calling this method introduces the `impl`'s `'static` requirement | |
126 | infer_dtcs_suggestion = consider relaxing the implicit `'static` requirement | |
127 | ||
128 | infer_explicit_lifetime_required_sugg_with_ident = add explicit lifetime `{$named}` to the type of `{$simple_ident}` | |
129 | ||
130 | infer_explicit_lifetime_required_sugg_with_param_type = add explicit lifetime `{$named}` to type | |
131 | ||
132 | infer_explicit_lifetime_required_with_ident = explicit lifetime required in the type of `{$simple_ident}` | |
133 | .label = lifetime `{$named}` required | |
134 | ||
135 | infer_explicit_lifetime_required_with_param_type = explicit lifetime required in parameter type | |
136 | .label = lifetime `{$named}` required | |
137 | ||
138 | infer_fn_consider_casting = consider casting the fn item to a fn pointer: `{$casting}` | |
139 | ||
140 | infer_fn_uniq_types = different fn items have unique types, even if their signatures are the same | |
141 | infer_fps_cast = consider casting to a fn pointer | |
142 | infer_fps_cast_both = consider casting both fn items to fn pointers using `as {$expected_sig}` | |
143 | ||
144 | infer_fps_items_are_distinct = fn items are distinct from fn pointers | |
145 | infer_fps_remove_ref = consider removing the reference | |
146 | infer_fps_use_ref = consider using a reference | |
147 | infer_fulfill_req_lifetime = the type `{$ty}` does not fulfill the required lifetime | |
148 | infer_implicit_static_lifetime_note = this has an implicit `'static` lifetime requirement | |
149 | infer_implicit_static_lifetime_suggestion = consider relaxing the implicit `'static` requirement | |
150 | infer_label_bad = {$bad_kind -> | |
151 | *[other] cannot infer type | |
152 | [more_info] cannot infer {$prefix_kind -> | |
153 | *[type] type for {$prefix} | |
154 | [const_with_param] the value of const parameter | |
155 | [const] the value of the constant | |
156 | } `{$name}`{$has_parent -> | |
157 | [true] {" "}declared on the {$parent_prefix} `{$parent_name}` | |
158 | *[false] {""} | |
159 | } | |
160 | } | |
161 | ||
162 | infer_lf_bound_not_satisfied = lifetime bound not satisfied | |
163 | infer_lifetime_mismatch = lifetime mismatch | |
164 | ||
165 | infer_lifetime_param_suggestion = consider introducing a named lifetime parameter{$is_impl -> | |
166 | [true] {" "}and update trait if needed | |
167 | *[false] {""} | |
168 | } | |
169 | infer_lifetime_param_suggestion_elided = each elided lifetime in input position becomes a distinct lifetime | |
170 | ||
171 | infer_meant_byte_literal = if you meant to write a byte literal, prefix with `b` | |
172 | infer_meant_char_literal = if you meant to write a `char` literal, use single quotes | |
173 | infer_meant_str_literal = if you meant to write a `str` literal, use double quotes | |
174 | infer_mismatched_static_lifetime = incompatible lifetime on type | |
9c376795 FG |
175 | infer_more_targeted = {$has_param_name -> |
176 | [true] `{$param_name}` | |
177 | *[false] `fn` parameter | |
178 | } has {$has_lifetime -> | |
9ffffee4 FG |
179 | [true] lifetime `{$lifetime}` |
180 | *[false] an anonymous lifetime `'_` | |
9c376795 FG |
181 | } but calling `{$ident}` introduces an implicit `'static` lifetime requirement |
182 | ||
49aad941 FG |
183 | infer_msl_introduces_static = introduces a `'static` lifetime requirement |
184 | infer_msl_trait_note = this has an implicit `'static` lifetime requirement | |
185 | infer_msl_trait_sugg = consider relaxing the implicit `'static` requirement | |
186 | infer_msl_unmet_req = because this has an unmet lifetime requirement | |
187 | infer_need_type_info_in_generator = | |
188 | type inside {$generator_kind -> | |
189 | [async_block] `async` block | |
190 | [async_closure] `async` closure | |
191 | [async_fn] `async fn` body | |
192 | *[generator] generator | |
193 | } must be known in this context | |
9ffffee4 | 194 | |
9ffffee4 | 195 | |
49aad941 | 196 | infer_nothing = {""} |
9ffffee4 | 197 | |
49aad941 FG |
198 | infer_oc_cant_coerce = cannot coerce intrinsics to function pointers |
199 | infer_oc_closure_selfref = closure/generator type that references itself | |
200 | infer_oc_const_compat = const not compatible with trait | |
201 | infer_oc_fn_main_correct_type = `main` function has wrong type | |
202 | infer_oc_fn_start_correct_type = `#[start]` function has wrong type | |
203 | infer_oc_generic = mismatched types | |
204 | ||
205 | infer_oc_if_else_different = `if` and `else` have incompatible types | |
206 | infer_oc_intrinsic_correct_type = intrinsic has wrong type | |
207 | infer_oc_match_compat = `match` arms have incompatible types | |
208 | infer_oc_method_compat = method not compatible with trait | |
209 | infer_oc_method_correct_type = mismatched `self` parameter type | |
210 | infer_oc_no_diverge = `else` clause of `let...else` does not diverge | |
211 | infer_oc_no_else = `if` may be missing an `else` clause | |
212 | infer_oc_try_compat = `?` operator has incompatible types | |
213 | infer_oc_type_compat = type not compatible with trait | |
214 | infer_opaque_captures_lifetime = hidden type for `{$opaque_ty}` captures lifetime that does not appear in bounds | |
215 | .label = opaque type defined here | |
216 | ||
217 | infer_opaque_hidden_type = | |
218 | opaque type's hidden type cannot be another opaque type from the same scope | |
219 | .label = one of the two opaque types used here has to be outside its defining scope | |
220 | .opaque_type = opaque type whose hidden type is being assigned | |
221 | .hidden_type = opaque type being used as hidden type | |
9ffffee4 | 222 | |
49aad941 FG |
223 | infer_outlives_bound = lifetime of the source pointer does not outlive lifetime bound of the object type |
224 | infer_outlives_content = lifetime of reference outlives lifetime of borrowed content... | |
9ffffee4 FG |
225 | infer_prlf_defined_with_sub = the lifetime `{$sub_symbol}` defined here... |
226 | infer_prlf_defined_without_sub = the lifetime defined here... | |
9ffffee4 FG |
227 | infer_prlf_known_limitation = this is a known limitation that will be removed in the future (see issue #100013 <https://github.com/rust-lang/rust/issues/100013> for more information) |
228 | ||
49aad941 FG |
229 | infer_prlf_must_outlive_with_sup = ...must outlive the lifetime `{$sup_symbol}` defined here |
230 | infer_prlf_must_outlive_without_sup = ...must outlive the lifetime defined here | |
231 | infer_reborrow = ...so that reference does not outlive borrowed content | |
232 | infer_reborrow_upvar = ...so that closure can access `{$name}` | |
233 | infer_ref_longer_than_data = in type `{$ty}`, reference has a longer lifetime than the data it references | |
353b0b11 | 234 | |
49aad941 FG |
235 | infer_reference_outlives_referent = ...so that the reference type `{$name}` does not outlive the data it points at |
236 | infer_region_explanation = {$pref_kind -> | |
237 | *[should_not_happen] [{$pref_kind}] | |
238 | [ref_valid_for] ...the reference is valid for | |
239 | [content_valid_for] ...but the borrowed content is only valid for | |
240 | [type_obj_valid_for] object type is valid for | |
241 | [source_pointer_valid_for] source pointer is only valid for | |
242 | [type_satisfy] type must satisfy | |
243 | [type_outlive] type must outlive | |
244 | [lf_param_instantiated_with] lifetime parameter instantiated with | |
245 | [lf_param_must_outlive] but lifetime parameter must outlive | |
246 | [lf_instantiated_with] lifetime instantiated with | |
247 | [lf_must_outlive] but lifetime must outlive | |
248 | [pointer_valid_for] the pointer is valid for | |
249 | [data_valid_for] but the referenced data is only valid for | |
250 | [empty] {""} | |
251 | }{$pref_kind -> | |
252 | [empty] {""} | |
253 | *[other] {" "} | |
254 | }{$desc_kind -> | |
255 | *[should_not_happen] [{$desc_kind}] | |
256 | [restatic] the static lifetime | |
257 | [revar] lifetime {$desc_arg} | |
258 | [as_defined] the lifetime `{$desc_arg}` as defined here | |
259 | [as_defined_anon] the anonymous lifetime as defined here | |
260 | [defined_here] the anonymous lifetime defined here | |
261 | [defined_here_reg] the lifetime `{$desc_arg}` as defined here | |
262 | }{$suff_kind -> | |
263 | *[should_not_happen] [{$suff_kind}] | |
264 | [empty]{""} | |
265 | [continues] ... | |
266 | [req_by_binding] {" "}as required by this binding | |
267 | } | |
353b0b11 | 268 | |
49aad941 FG |
269 | infer_relate_object_bound = ...so that it can be closed over into an object |
270 | infer_relate_param_bound = ...so that the type `{$name}` will meet its required lifetime bounds{$continues -> | |
271 | [true] ... | |
272 | *[false] {""} | |
273 | } | |
274 | infer_relate_param_bound_2 = ...that is required by this bound | |
275 | infer_relate_region_param_bound = ...so that the declared lifetime parameter bounds are satisfied | |
276 | infer_ril_because_of = because of this returned expression | |
277 | infer_ril_introduced_by = requirement introduced by this return type | |
278 | infer_ril_introduced_here = `'static` requirement introduced here | |
279 | infer_ril_static_introduced_by = "`'static` lifetime requirement introduced by the return type | |
353b0b11 FG |
280 | |
281 | infer_sarwa_option = you can convert from `&Option<T>` to `Option<&T>` using `.as_ref()` | |
282 | infer_sarwa_result = you can convert from `&Result<T, E>` to `Result<&T, &E>` using `.as_ref()` | |
283 | ||
49aad941 | 284 | infer_sbfrit_box_return_expr = if you change the return type to expect trait objects, box the returned expressions |
353b0b11 FG |
285 | |
286 | infer_sbfrit_change_return_type = you could change the return type to be a boxed trait object | |
49aad941 FG |
287 | infer_source_kind_closure_return = |
288 | try giving this closure an explicit return type | |
353b0b11 | 289 | |
49aad941 FG |
290 | # generator_kind may need to be translated |
291 | infer_source_kind_fully_qualified = | |
292 | try using a fully qualified path to specify the expected types | |
293 | ||
294 | infer_source_kind_subdiag_generic_label = | |
295 | cannot infer {$is_type -> | |
296 | [true] type | |
297 | *[false] the value | |
298 | } of the {$is_type -> | |
299 | [true] type | |
300 | *[false] const | |
301 | } {$parent_exists -> | |
302 | [true] parameter `{$param_name}` declared on the {$parent_prefix} `{$parent_name}` | |
303 | *[false] parameter {$param_name} | |
304 | } | |
305 | ||
306 | infer_source_kind_subdiag_generic_suggestion = | |
307 | consider specifying the generic {$arg_count -> | |
308 | [one] argument | |
309 | *[other] arguments | |
310 | } | |
311 | ||
312 | infer_source_kind_subdiag_let = {$kind -> | |
313 | [with_pattern] consider giving `{$name}` an explicit type | |
314 | [closure] consider giving this closure parameter an explicit type | |
315 | *[other] consider giving this pattern a type | |
316 | }{$x_kind -> | |
317 | [has_name] , where the {$prefix_kind -> | |
318 | *[type] type for {$prefix} | |
319 | [const_with_param] value of const parameter | |
320 | [const] value of the constant | |
321 | } `{$arg_name}` is specified | |
322 | [underscore] , where the placeholders `_` are specified | |
323 | *[empty] {""} | |
324 | } | |
325 | ||
326 | infer_srs_add = consider returning the local binding `{$ident}` | |
327 | infer_srs_add_one = consider returning one of these bindings | |
328 | ||
329 | infer_srs_remove = consider removing this semicolon | |
330 | infer_srs_remove_and_box = consider removing this semicolon and boxing the expressions | |
353b0b11 FG |
331 | infer_stp_wrap_many = try wrapping the pattern in a variant of `{$path}` |
332 | ||
49aad941 FG |
333 | infer_stp_wrap_one = try wrapping the pattern in `{$variant}` |
334 | infer_subtype = ...so that the {$requirement -> | |
335 | [method_compat] method type is compatible with trait | |
336 | [type_compat] associated type is compatible with trait | |
337 | [const_compat] const is compatible with trait | |
338 | [expr_assignable] expression is assignable | |
339 | [if_else_different] `if` and `else` have incompatible types | |
340 | [no_else] `if` missing an `else` returns `()` | |
341 | [fn_main_correct_type] `main` function has the correct type | |
342 | [fn_start_correct_type] `#[start]` function has the correct type | |
343 | [intrinsic_correct_type] intrinsic has the correct type | |
344 | [method_correct_type] method receiver has the correct type | |
345 | *[other] types are compatible | |
346 | } | |
347 | infer_subtype_2 = ...so that {$requirement -> | |
348 | [method_compat] method type is compatible with trait | |
349 | [type_compat] associated type is compatible with trait | |
350 | [const_compat] const is compatible with trait | |
351 | [expr_assignable] expression is assignable | |
352 | [if_else_different] `if` and `else` have incompatible types | |
353 | [no_else] `if` missing an `else` returns `()` | |
354 | [fn_main_correct_type] `main` function has the correct type | |
355 | [fn_start_correct_type] `#[start]` function has the correct type | |
356 | [intrinsic_correct_type] intrinsic has the correct type | |
357 | [method_correct_type] method receiver has the correct type | |
358 | *[other] types are compatible | |
359 | } | |
353b0b11 | 360 | |
49aad941 FG |
361 | infer_suggest_accessing_field = you might have meant to use field `{$name}` whose type is `{$ty}` |
362 | ||
363 | infer_suggest_add_let_for_letchains = consider adding `let` | |
364 | ||
365 | infer_tid_consider_borrowing = consider borrowing this type parameter in the trait | |
366 | infer_tid_param_help = the lifetime requirements from the `impl` do not correspond to the requirements in the `trait` | |
367 | ||
368 | infer_tid_rel_help = verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output | |
369 | infer_trait_impl_diff = `impl` item signature doesn't match `trait` item signature | |
370 | .found = found `{$found}` | |
371 | .expected = expected `{$expected}` | |
372 | .expected_found = expected signature `{$expected}` | |
373 | {" "}found signature `{$found}` | |
374 | ||
375 | infer_trait_placeholder_mismatch = implementation of `{$trait_def_id}` is not general enough | |
376 | .label_satisfy = doesn't satisfy where-clause | |
377 | .label_where = due to a where-clause on `{$def_id}`... | |
378 | .label_dup = implementation of `{$trait_def_id}` is not general enough | |
353b0b11 | 379 | |
353b0b11 | 380 | infer_try_cannot_convert = `?` operator cannot convert from `{$found}` to `{$expected}` |
49aad941 FG |
381 | |
382 | infer_tuple_trailing_comma = use a trailing comma to create a tuple with one element | |
383 | ||
384 | infer_type_annotations_needed = {$source_kind -> | |
385 | [closure] type annotations needed for the closure `{$source_name}` | |
386 | [normal] type annotations needed for `{$source_name}` | |
387 | *[other] type annotations needed | |
388 | } | |
389 | .label = type must be known at this point | |
390 | ||
391 | infer_types_declared_different = these two types are declared with different lifetimes... | |
392 | infer_where_copy_predicates = copy the `where` clause predicates from the trait | |
393 | ||
394 | infer_where_remove = remove the `where` clause |