]> git.proxmox.com Git - rustc.git/blob - compiler/rustc_hir_analysis/messages.ftl
New upstream version 1.74.1+dfsg1
[rustc.git] / compiler / rustc_hir_analysis / messages.ftl
1 hir_analysis_ambiguous_lifetime_bound =
2 ambiguous lifetime bound, explicit lifetime bound required
3
4 hir_analysis_assoc_bound_on_const = expected associated type, found {$descr}
5 .note = trait bounds not allowed on {$descr}
6
7 hir_analysis_assoc_type_binding_not_allowed =
8 associated type bindings are not allowed here
9 .label = associated type not allowed here
10
11 hir_analysis_associated_type_trait_uninferred_generic_params = cannot use the associated type of a trait with uninferred generic parameters
12 .suggestion = use a fully qualified path with inferred lifetimes
13
14 hir_analysis_associated_type_trait_uninferred_generic_params_multipart_suggestion = use a fully qualified path with explicit lifetimes
15
16 hir_analysis_async_trait_impl_should_be_async =
17 method `{$method_name}` should be async because the method from the trait is async
18 .trait_item_label = required because the trait method is async
19
20 hir_analysis_auto_deref_reached_recursion_limit = reached the recursion limit while auto-dereferencing `{$ty}`
21 .label = deref recursion limit reached
22 .help = consider increasing the recursion limit by adding a `#![recursion_limit = "{$suggested_limit}"]` attribute to your crate (`{$crate_name}`)
23
24 hir_analysis_cannot_capture_late_bound_const =
25 cannot capture late-bound const parameter in {$what}
26 .label = parameter defined here
27
28 hir_analysis_cannot_capture_late_bound_lifetime =
29 cannot capture late-bound lifetime in {$what}
30 .label = lifetime defined here
31
32 hir_analysis_cannot_capture_late_bound_ty =
33 cannot capture late-bound type parameter in {$what}
34 .label = parameter defined here
35
36 hir_analysis_cast_thin_pointer_to_fat_pointer = cannot cast thin pointer `{$expr_ty}` to fat pointer `{$cast_ty}`
37
38 hir_analysis_closure_implicit_hrtb = implicit types in closure signatures are forbidden when `for<...>` is present
39 .label = `for<...>` is here
40
41 hir_analysis_coerce_unsized_may = the trait `{$trait_name}` may only be implemented for a coercion between structures
42
43 hir_analysis_coerce_unsized_multi = implementing the trait `CoerceUnsized` requires multiple coercions
44 .note = `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced
45 .coercions_note = currently, {$number} fields need coercions: {$coercions}
46 .label = requires multiple coercions
47
48 hir_analysis_coercion_between_struct_same_note = expected coercion between the same definition; expected `{$source_path}`, found `{$target_path}`
49
50 hir_analysis_coercion_between_struct_single_note = expected a single field to be coerced, none found
51
52 hir_analysis_const_bound_for_non_const_trait =
53 ~const can only be applied to `#[const_trait]` traits
54
55 hir_analysis_const_impl_for_non_const_trait =
56 const `impl` for trait `{$trait_name}` which is not marked with `#[const_trait]`
57 .suggestion = mark `{$trait_name}` as const
58 .note = marking a trait with `#[const_trait]` ensures all default method bodies are `const`
59 .adding = adding a non-const method body in the future would be a breaking change
60
61 hir_analysis_const_param_ty_impl_on_non_adt =
62 the trait `ConstParamTy` may not be implemented for this type
63 .label = type is not a structure or enumeration
64
65 hir_analysis_const_specialize = cannot specialize on const impl with non-const impl
66
67 hir_analysis_copy_impl_on_non_adt =
68 the trait `Copy` cannot be implemented for this type
69 .label = type is not a structure or enumeration
70
71 hir_analysis_copy_impl_on_type_with_dtor =
72 the trait `Copy` cannot be implemented for this type; the type has a destructor
73 .label = `Copy` not allowed on types with destructors
74
75 hir_analysis_dispatch_from_dyn_multi = implementing the `DispatchFromDyn` trait requires multiple coercions
76 .note = the trait `DispatchFromDyn` may only be implemented for a coercion between structures with a single field being coerced
77 .coercions_note = currently, {$number} fields need coercions: {$coercions}
78
79 hir_analysis_dispatch_from_dyn_repr = structs implementing `DispatchFromDyn` may not have `#[repr(packed)]` or `#[repr(C)]`
80
81 hir_analysis_dispatch_from_dyn_zst = the trait `DispatchFromDyn` may only be implemented for structs containing the field being coerced, ZST fields with 1 byte alignment, and nothing else
82 .note = extra field `{$name}` of type `{$ty}` is not allowed
83
84 hir_analysis_drop_impl_negative = negative `Drop` impls are not supported
85
86 hir_analysis_drop_impl_on_wrong_item =
87 the `Drop` trait may only be implemented for local structs, enums, and unions
88 .label = must be a struct, enum, or union in the current crate
89
90 hir_analysis_drop_impl_reservation = reservation `Drop` impls are not supported
91
92 hir_analysis_empty_specialization = specialization impl does not specialize any associated items
93 .note = impl is a specialization of this impl
94
95 hir_analysis_enum_discriminant_overflowed = enum discriminant overflowed
96 .label = overflowed on value after {$discr}
97 .note = explicitly set `{$item_name} = {$wrapped_discr}` if that is desired outcome
98
99 hir_analysis_expected_used_symbol = expected `used`, `used(compiler)` or `used(linker)`
100
101 hir_analysis_field_already_declared =
102 field `{$field_name}` is already declared
103 .label = field already declared
104 .previous_decl_label = `{$field_name}` first declared here
105
106 hir_analysis_function_not_found_in_trait = function not found in this trait
107
108 hir_analysis_function_not_have_default_implementation = function doesn't have a default implementation
109 .note = required by this annotation
110
111 hir_analysis_functions_names_duplicated = functions names are duplicated
112 .note = all `#[rustc_must_implement_one_of]` arguments must be unique
113
114 hir_analysis_impl_not_marked_default = `{$ident}` specializes an item from a parent `impl`, but that item is not marked `default`
115 .label = cannot specialize default item `{$ident}`
116 .ok_label = parent `impl` is here
117 .note = to specialize, `{$ident}` in the parent `impl` must be marked `default`
118
119 hir_analysis_impl_not_marked_default_err = `{$ident}` specializes an item from a parent `impl`, but that item is not marked `default`
120 .note = parent implementation is in crate `{$cname}`
121
122 hir_analysis_inherent_dyn = cannot define inherent `impl` for a dyn auto trait
123 .label = impl requires at least one non-auto trait
124 .note = define and implement a new trait or type instead
125
126 hir_analysis_inherent_nominal = no nominal type found for inherent implementation
127 .label = impl requires a nominal type
128 .note = either implement a trait on it or create a newtype to wrap it instead
129 hir_analysis_inherent_primitive_ty = cannot define inherent `impl` for primitive types
130 .help = consider using an extension trait instead
131
132 hir_analysis_inherent_primitive_ty_note = you could also try moving the reference to uses of `{$subty}` (such as `self`) within the implementation
133
134 hir_analysis_inherent_ty_outside = cannot define inherent `impl` for a type outside of the crate where the type is defined
135 .help = consider moving this inherent impl into the crate defining the type if possible
136 .span_help = alternatively add `#[rustc_has_incoherent_inherent_impls]` to the type and `#[rustc_allow_incoherent_impl]` to the relevant impl items
137
138 hir_analysis_inherent_ty_outside_new = cannot define inherent `impl` for a type outside of the crate where the type is defined
139 .label = impl for type defined outside of crate.
140 .note = define and implement a trait or new type instead
141
142 hir_analysis_inherent_ty_outside_primitive = cannot define inherent `impl` for primitive types outside of `core`
143 .help = consider moving this inherent impl into `core` if possible
144 .span_help = alternatively add `#[rustc_allow_incoherent_impl]` to the relevant impl items
145
146 hir_analysis_inherent_ty_outside_relevant = cannot define inherent `impl` for a type outside of the crate where the type is defined
147 .help = consider moving this inherent impl into the crate defining the type if possible
148 .span_help = alternatively add `#[rustc_allow_incoherent_impl]` to the relevant impl items
149
150 hir_analysis_invalid_union_field =
151 field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
152 .note = union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
153
154 hir_analysis_invalid_union_field_sugg =
155 wrap the field type in `ManuallyDrop<...>`
156
157 hir_analysis_late_bound_const_in_apit = `impl Trait` can only mention const parameters from an fn or impl
158 .label = const parameter declared here
159
160 hir_analysis_late_bound_lifetime_in_apit = `impl Trait` can only mention lifetimes from an fn or impl
161 .label = lifetime declared here
162
163 hir_analysis_late_bound_type_in_apit = `impl Trait` can only mention type parameters from an fn or impl
164 .label = type parameter declared here
165
166 hir_analysis_lifetimes_or_bounds_mismatch_on_trait =
167 lifetime parameters or bounds on {$item_kind} `{$ident}` do not match the trait declaration
168 .label = lifetimes do not match {$item_kind} in trait
169 .generics_label = lifetimes in impl do not match this {$item_kind} in trait
170 .where_label = this `where` clause might not match the one in the trait
171 .bounds_label = this bound might be missing in the impl
172
173 hir_analysis_linkage_type =
174 invalid type for variable with `#[linkage]` attribute
175
176 hir_analysis_main_function_async = `main` function is not allowed to be `async`
177 .label = `main` function is not allowed to be `async`
178
179 hir_analysis_main_function_generic_parameters = `main` function is not allowed to have generic parameters
180 .label = `main` cannot have generic parameters
181
182 hir_analysis_main_function_return_type_generic = `main` function return type is not allowed to have generic parameters
183
184 hir_analysis_manual_implementation =
185 manual implementations of `{$trait_name}` are experimental
186 .label = manual implementations of `{$trait_name}` are experimental
187 .help = add `#![feature(unboxed_closures)]` to the crate attributes to enable
188
189 hir_analysis_missing_one_of_trait_item = not all trait items implemented, missing one of: `{$missing_items_msg}`
190 .label = missing one of `{$missing_items_msg}` in implementation
191 .note = required because of this annotation
192
193 hir_analysis_missing_tilde_const = missing `~const` qualifier for specialization
194
195 hir_analysis_missing_trait_item = not all trait items implemented, missing: `{$missing_items_msg}`
196 .label = missing `{$missing_items_msg}` in implementation
197
198 hir_analysis_missing_trait_item_label = `{$item}` from trait
199
200 hir_analysis_missing_trait_item_suggestion = implement the missing item: `{$snippet}`
201
202 hir_analysis_missing_trait_item_unstable = not all trait items implemented, missing: `{$missing_item_name}`
203 .note = default implementation of `{$missing_item_name}` is unstable
204 .some_note = use of unstable library feature '{$feature}': {$reason}
205 .none_note = use of unstable library feature '{$feature}'
206
207 hir_analysis_missing_type_params =
208 the type {$parameterCount ->
209 [one] parameter
210 *[other] parameters
211 } {$parameters} must be explicitly specified
212 .label = type {$parameterCount ->
213 [one] parameter
214 *[other] parameters
215 } {$parameters} must be specified for this
216 .suggestion = set the type {$parameterCount ->
217 [one] parameter
218 *[other] parameters
219 } to the desired {$parameterCount ->
220 [one] type
221 *[other] types
222 }
223 .no_suggestion_label = missing {$parameterCount ->
224 [one] reference
225 *[other] references
226 } to {$parameters}
227 .note = because of the default `Self` reference, type parameters must be specified on object types
228
229 hir_analysis_multiple_relaxed_default_bounds =
230 type parameter has more than one relaxed default bound, only one is supported
231
232 hir_analysis_must_be_name_of_associated_function = must be a name of an associated function
233
234 hir_analysis_must_implement_not_function = not a function
235
236 hir_analysis_must_implement_not_function_note = all `#[rustc_must_implement_one_of]` arguments must be associated function names
237
238 hir_analysis_must_implement_not_function_span_note = required by this annotation
239
240 hir_analysis_must_implement_one_of_attribute = the `#[rustc_must_implement_one_of]` attribute must be used with at least 2 args
241
242 hir_analysis_paren_sugar_attribute = the `#[rustc_paren_sugar]` attribute is a temporary means of controlling which traits can use parenthetical notation
243 .help = add `#![feature(unboxed_closures)]` to the crate attributes to use it
244
245 hir_analysis_parenthesized_fn_trait_expansion =
246 parenthesized trait syntax expands to `{$expanded_type}`
247
248 hir_analysis_pass_to_variadic_function = can't pass `{$ty}` to variadic function
249 .suggestion = cast the value to `{$cast_ty}`
250 .help = cast the value to `{$cast_ty}`
251
252 hir_analysis_placeholder_not_allowed_item_signatures = the placeholder `_` is not allowed within types on item signatures for {$kind}
253 .label = not allowed in type signatures
254
255 hir_analysis_requires_note = the `{$trait_name}` impl for `{$ty}` requires that `{$error_predicate}`
256
257 hir_analysis_return_type_notation_conflicting_bound =
258 ambiguous associated function `{$assoc_name}` for `{$ty_name}`
259 .note = `{$assoc_name}` is declared in two supertraits: `{$first_bound}` and `{$second_bound}`
260
261 hir_analysis_return_type_notation_equality_bound =
262 return type notation is not allowed to use type equality
263
264 hir_analysis_return_type_notation_illegal_param_const =
265 return type notation is not allowed for functions that have const parameters
266 .label = const parameter declared here
267 hir_analysis_return_type_notation_illegal_param_type =
268 return type notation is not allowed for functions that have type parameters
269 .label = type parameter declared here
270
271 hir_analysis_return_type_notation_missing_method =
272 cannot find associated function `{$assoc_name}` for `{$ty_name}`
273
274 hir_analysis_return_type_notation_on_non_rpitit =
275 return type notation used on function that is not `async` and does not return `impl Trait`
276 .note = function returns `{$ty}`, which is not compatible with associated type return bounds
277 .label = this function must be `async` or return `impl Trait`
278
279 hir_analysis_rpitit_refined = impl trait in impl method signature does not match trait method signature
280 .suggestion = replace the return type so that it matches the trait
281 .label = return type from trait method defined here
282 .unmatched_bound_label = this bound is stronger than that defined on the trait
283 .note = add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
284
285 hir_analysis_self_in_impl_self =
286 `Self` is not valid in the self type of an impl block
287 .note = replace `Self` with a different type
288
289 hir_analysis_simd_ffi_highly_experimental = use of SIMD type{$snip} in FFI is highly experimental and may result in invalid code
290 .help = add `#![feature(simd_ffi)]` to the crate attributes to enable
291
292 hir_analysis_specialization_trait = implementing `rustc_specialization_trait` traits is unstable
293 .help = add `#![feature(min_specialization)]` to the crate attributes to enable
294
295 hir_analysis_start_function_parameters = `#[start]` function is not allowed to have type parameters
296 .label = `#[start]` function cannot have type parameters
297
298 hir_analysis_start_function_where = `#[start]` function is not allowed to have a `where` clause
299 .label = `#[start]` function cannot have a `where` clause
300
301 hir_analysis_start_not_async = `#[start]` function is not allowed to be `async`
302 .label = `#[start]` is not allowed to be `async`
303
304 hir_analysis_start_not_target_feature = `#[start]` function is not allowed to have `#[target_feature]`
305 .label = `#[start]` function is not allowed to have `#[target_feature]`
306
307 hir_analysis_start_not_track_caller = `#[start]` function is not allowed to be `#[track_caller]`
308 .label = `#[start]` function is not allowed to be `#[track_caller]`
309
310 hir_analysis_static_specialize = cannot specialize on `'static` lifetime
311
312 hir_analysis_substs_on_overridden_impl = could not resolve substs on overridden impl
313
314 hir_analysis_tait_forward_compat = item constrains opaque type that is not in its signature
315 .note = this item must mention the opaque type in its signature in order to be able to register hidden types
316
317 hir_analysis_target_feature_on_main = `main` function is not allowed to have `#[target_feature]`
318
319 hir_analysis_too_large_static = extern static is too large for the current architecture
320
321 hir_analysis_track_caller_on_main = `main` function is not allowed to be `#[track_caller]`
322 .suggestion = remove this annotation
323
324 hir_analysis_trait_cannot_impl_for_ty = the trait `{$trait_name}` cannot be implemented for this type
325 .label = this field does not implement `{$trait_name}`
326
327 hir_analysis_trait_object_declared_with_no_traits =
328 at least one trait is required for an object type
329 .alias_span = this alias does not contain a trait
330
331 hir_analysis_transparent_enum_variant = transparent enum needs exactly one variant, but has {$number}
332 .label = needs exactly one variant, but has {$number}
333 .many_label = too many variants in `{$path}`
334 .multi_label = variant here
335
336 hir_analysis_transparent_non_zero_sized = transparent {$desc} needs at most one field with non-trivial size or alignment, but has {$field_count}
337 .label = needs at most one field with non-trivial size or alignment, but has {$field_count}
338 .labels = this field has non-zero size or requires alignment
339
340 hir_analysis_transparent_non_zero_sized_enum = the variant of a transparent {$desc} needs at most one field with non-trivial size or alignment, but has {$field_count}
341 .label = needs at most one field with non-trivial size or alignment, but has {$field_count}
342 .labels = this field has non-zero size or requires alignment
343
344 hir_analysis_typeof_reserved_keyword_used =
345 `typeof` is a reserved keyword but unimplemented
346 .suggestion = consider replacing `typeof(...)` with an actual type
347 .label = reserved keyword
348
349 hir_analysis_unconstrained_opaque_type = unconstrained opaque type
350 .note = `{$name}` must be used in combination with a concrete type within the same {$what}
351
352 hir_analysis_unrecognized_atomic_operation =
353 unrecognized atomic operation function: `{$op}`
354 .label = unrecognized atomic operation
355
356 hir_analysis_unrecognized_intrinsic_function =
357 unrecognized intrinsic function: `{$name}`
358 .label = unrecognized intrinsic
359
360 hir_analysis_unused_associated_type_bounds =
361 unnecessary associated type bound for not object safe associated type
362 .note = this associated type has a `where Self: Sized` bound. Thus, while the associated type can be specified, it cannot be used in any way, because trait objects are not `Sized`.
363 .suggestion = remove this bound
364
365 hir_analysis_value_of_associated_struct_already_specified =
366 the value of the associated type `{$item_name}` (from trait `{$def_path}`) is already specified
367 .label = re-bound here
368 .previous_bound_label = `{$item_name}` bound here first
369
370 hir_analysis_variadic_function_compatible_convention = C-variadic function must have a compatible calling convention, like {$conventions}
371 .label = C-variadic function must have a compatible calling convention
372
373 hir_analysis_variances_of = {$variances_of}
374
375 hir_analysis_where_clause_on_main = `main` function is not allowed to have a `where` clause
376 .label = `main` cannot have a `where` clause
377
378 hir_analysis_wrong_number_of_generic_arguments_to_intrinsic =
379 intrinsic has wrong number of {$descr} parameters: found {$found}, expected {$expected}
380 .label = expected {$expected} {$descr} {$expected ->
381 [one] parameter
382 *[other] parameters
383 }