]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_hir_analysis/messages.ftl
New upstream version 1.73.0+dfsg1
[rustc.git] / compiler / rustc_hir_analysis / messages.ftl
CommitLineData
49aad941
FG
1hir_analysis_ambiguous_lifetime_bound =
2 ambiguous lifetime bound, explicit lifetime bound required
04454e1e 3
add651ee
FG
4hir_analysis_assoc_bound_on_const = expected associated type, found {$descr}
5 .note = trait bounds not allowed on {$descr}
6
49aad941
FG
7hir_analysis_assoc_type_binding_not_allowed =
8 associated type bindings are not allowed here
9 .label = associated type not allowed here
04454e1e 10
49aad941
FG
11hir_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
04454e1e 13
49aad941 14hir_analysis_associated_type_trait_uninferred_generic_params_multipart_suggestion = use a fully qualified path with explicit lifetimes
04454e1e 15
9c376795
FG
16hir_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
49aad941
FG
20hir_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
24hir_analysis_cannot_capture_late_bound_const_in_anon_const =
25 cannot capture late-bound const parameter in a constant
26 .label = parameter defined here
27
28hir_analysis_cannot_capture_late_bound_ty_in_anon_const =
29 cannot capture late-bound type parameter in a constant
30 .label = parameter defined here
31
32hir_analysis_cast_thin_pointer_to_fat_pointer = cannot cast thin pointer `{$expr_ty}` to fat pointer `{$cast_ty}`
33
34hir_analysis_closure_implicit_hrtb = implicit types in closure signatures are forbidden when `for<...>` is present
35 .label = `for<...>` is here
36
37hir_analysis_const_bound_for_non_const_trait =
38 ~const can only be applied to `#[const_trait]` traits
39
40hir_analysis_const_impl_for_non_const_trait =
41 const `impl` for trait `{$trait_name}` which is not marked with `#[const_trait]`
42 .suggestion = mark `{$trait_name}` as const
43 .note = marking a trait with `#[const_trait]` ensures all default method bodies are `const`
44 .adding = adding a non-const method body in the future would be a breaking change
45
46hir_analysis_const_param_ty_impl_on_non_adt =
47 the trait `ConstParamTy` may not be implemented for this type
48 .label = type is not a structure or enumeration
49
50hir_analysis_const_specialize = cannot specialize on const impl with non-const impl
51
52hir_analysis_copy_impl_on_non_adt =
53 the trait `Copy` cannot be implemented for this type
54 .label = type is not a structure or enumeration
55
56hir_analysis_copy_impl_on_type_with_dtor =
57 the trait `Copy` cannot be implemented for this type; the type has a destructor
58 .label = `Copy` not allowed on types with destructors
59
60hir_analysis_drop_impl_negative = negative `Drop` impls are not supported
61
2b03887a 62hir_analysis_drop_impl_on_wrong_item =
f2b60f7d
FG
63 the `Drop` trait may only be implemented for local structs, enums, and unions
64 .label = must be a struct, enum, or union in the current crate
04454e1e 65
49aad941
FG
66hir_analysis_drop_impl_reservation = reservation `Drop` impls are not supported
67
68hir_analysis_empty_specialization = specialization impl does not specialize any associated items
69 .note = impl is a specialization of this impl
70
71hir_analysis_enum_discriminant_overflowed = enum discriminant overflowed
72 .label = overflowed on value after {$discr}
73 .note = explicitly set `{$item_name} = {$wrapped_discr}` if that is desired outcome
74
75hir_analysis_expected_used_symbol = expected `used`, `used(compiler)` or `used(linker)`
76
2b03887a 77hir_analysis_field_already_declared =
04454e1e
FG
78 field `{$field_name}` is already declared
79 .label = field already declared
f2b60f7d 80 .previous_decl_label = `{$field_name}` first declared here
04454e1e 81
49aad941 82hir_analysis_function_not_found_in_trait = function not found in this trait
04454e1e 83
49aad941
FG
84hir_analysis_function_not_have_default_implementation = function doesn't have a default implementation
85 .note = required by this annotation
04454e1e 86
49aad941
FG
87hir_analysis_functions_names_duplicated = functions names are duplicated
88 .note = all `#[rustc_must_implement_one_of]` arguments must be unique
04454e1e 89
49aad941
FG
90hir_analysis_impl_not_marked_default = `{$ident}` specializes an item from a parent `impl`, but that item is not marked `default`
91 .label = cannot specialize default item `{$ident}`
92 .ok_label = parent `impl` is here
93 .note = to specialize, `{$ident}` in the parent `impl` must be marked `default`
353b0b11 94
49aad941
FG
95hir_analysis_impl_not_marked_default_err = `{$ident}` specializes an item from a parent `impl`, but that item is not marked `default`
96 .note = parent implementation is in crate `{$cname}`
04454e1e 97
49aad941
FG
98hir_analysis_invalid_union_field =
99 field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
100 .note = union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
04454e1e 101
49aad941
FG
102hir_analysis_invalid_union_field_sugg =
103 wrap the field type in `ManuallyDrop<...>`
104
fe692bf9
FG
105hir_analysis_late_bound_const_in_apit = `impl Trait` can only mention const parameters from an fn or impl
106 .label = const parameter declared here
107
108hir_analysis_late_bound_lifetime_in_apit = `impl Trait` can only mention lifetimes from an fn or impl
109 .label = lifetime declared here
110
111hir_analysis_late_bound_type_in_apit = `impl Trait` can only mention type parameters from an fn or impl
112 .label = type parameter declared here
113
49aad941
FG
114hir_analysis_lifetimes_or_bounds_mismatch_on_trait =
115 lifetime parameters or bounds on {$item_kind} `{$ident}` do not match the trait declaration
116 .label = lifetimes do not match {$item_kind} in trait
117 .generics_label = lifetimes in impl do not match this {$item_kind} in trait
118 .where_label = this `where` clause might not match the one in the trait
119 .bounds_label = this bound might be missing in the impl
120
121hir_analysis_linkage_type =
122 invalid type for variable with `#[linkage]` attribute
123
124hir_analysis_main_function_async = `main` function is not allowed to be `async`
125 .label = `main` function is not allowed to be `async`
126
127hir_analysis_main_function_generic_parameters = `main` function is not allowed to have generic parameters
128 .label = `main` cannot have generic parameters
129
130hir_analysis_main_function_return_type_generic = `main` function return type is not allowed to have generic parameters
04454e1e 131
9ffffee4
FG
132hir_analysis_manual_implementation =
133 manual implementations of `{$trait_name}` are experimental
134 .label = manual implementations of `{$trait_name}` are experimental
135 .help = add `#![feature(unboxed_closures)]` to the crate attributes to enable
136
49aad941
FG
137hir_analysis_missing_one_of_trait_item = not all trait items implemented, missing one of: `{$missing_items_msg}`
138 .label = missing one of `{$missing_items_msg}` in implementation
139 .note = required because of this annotation
9ffffee4 140
49aad941
FG
141hir_analysis_missing_tilde_const = missing `~const` qualifier for specialization
142
143hir_analysis_missing_trait_item = not all trait items implemented, missing: `{$missing_items_msg}`
144 .label = missing `{$missing_items_msg}` in implementation
145
146hir_analysis_missing_trait_item_label = `{$item}` from trait
147
148hir_analysis_missing_trait_item_suggestion = implement the missing item: `{$snippet}`
149
150hir_analysis_missing_trait_item_unstable = not all trait items implemented, missing: `{$missing_item_name}`
151 .note = default implementation of `{$missing_item_name}` is unstable
fe692bf9 152 .some_note = use of unstable library feature '{$feature}': {$reason}
49aad941 153 .none_note = use of unstable library feature '{$feature}'
9ffffee4 154
2b03887a 155hir_analysis_missing_type_params =
04454e1e
FG
156 the type {$parameterCount ->
157 [one] parameter
158 *[other] parameters
159 } {$parameters} must be explicitly specified
160 .label = type {$parameterCount ->
161 [one] parameter
162 *[other] parameters
163 } {$parameters} must be specified for this
164 .suggestion = set the type {$parameterCount ->
165 [one] parameter
166 *[other] parameters
167 } to the desired {$parameterCount ->
168 [one] type
169 *[other] types
170 }
f2b60f7d 171 .no_suggestion_label = missing {$parameterCount ->
04454e1e
FG
172 [one] reference
173 *[other] references
174 } to {$parameters}
175 .note = because of the default `Self` reference, type parameters must be specified on object types
176
9ffffee4
FG
177hir_analysis_multiple_relaxed_default_bounds =
178 type parameter has more than one relaxed default bound, only one is supported
f2b60f7d 179
49aad941 180hir_analysis_must_be_name_of_associated_function = must be a name of an associated function
487cf647 181
49aad941 182hir_analysis_must_implement_not_function = not a function
9c376795 183
49aad941 184hir_analysis_must_implement_not_function_note = all `#[rustc_must_implement_one_of]` arguments must be associated function names
9ffffee4 185
49aad941 186hir_analysis_must_implement_not_function_span_note = required by this annotation
9ffffee4 187
49aad941 188hir_analysis_must_implement_one_of_attribute = the `#[rustc_must_implement_one_of]` attribute must be used with at least 2 args
9ffffee4 189
49aad941
FG
190hir_analysis_paren_sugar_attribute = the `#[rustc_paren_sugar]` attribute is a temporary means of controlling which traits can use parenthetical notation
191 .help = add `#![feature(unboxed_closures)]` to the crate attributes to use it
353b0b11 192
49aad941
FG
193hir_analysis_parenthesized_fn_trait_expansion =
194 parenthesized trait syntax expands to `{$expanded_type}`
9ffffee4 195
49aad941
FG
196hir_analysis_pass_to_variadic_function = can't pass `{$ty}` to variadic function
197 .suggestion = cast the value to `{$cast_ty}`
198 .help = cast the value to `{$cast_ty}`
353b0b11 199
49aad941
FG
200hir_analysis_placeholder_not_allowed_item_signatures = the placeholder `_` is not allowed within types on item signatures for {$kind}
201 .label = not allowed in type signatures
9ffffee4 202
49aad941
FG
203hir_analysis_return_type_notation_conflicting_bound =
204 ambiguous associated function `{$assoc_name}` for `{$ty_name}`
205 .note = `{$assoc_name}` is declared in two supertraits: `{$first_bound}` and `{$second_bound}`
9ffffee4 206
49aad941
FG
207hir_analysis_return_type_notation_equality_bound =
208 return type notation is not allowed to use type equality
9ffffee4 209
fe692bf9
FG
210hir_analysis_return_type_notation_illegal_param_const =
211 return type notation is not allowed for functions that have const parameters
212 .label = const parameter declared here
213hir_analysis_return_type_notation_illegal_param_type =
214 return type notation is not allowed for functions that have type parameters
215 .label = type parameter declared here
216
49aad941
FG
217hir_analysis_return_type_notation_missing_method =
218 cannot find associated function `{$assoc_name}` for `{$ty_name}`
9ffffee4 219
49aad941
FG
220hir_analysis_return_type_notation_on_non_rpitit =
221 return type notation used on function that is not `async` and does not return `impl Trait`
222 .note = function returns `{$ty}`, which is not compatible with associated type return bounds
223 .label = this function must be `async` or return `impl Trait`
9ffffee4 224
49aad941
FG
225hir_analysis_self_in_impl_self =
226 `Self` is not valid in the self type of an impl block
227 .note = replace `Self` with a different type
9ffffee4 228
49aad941
FG
229hir_analysis_simd_ffi_highly_experimental = use of SIMD type{$snip} in FFI is highly experimental and may result in invalid code
230 .help = add `#![feature(simd_ffi)]` to the crate attributes to enable
9ffffee4 231
49aad941
FG
232hir_analysis_specialization_trait = implementing `rustc_specialization_trait` traits is unstable
233 .help = add `#![feature(min_specialization)]` to the crate attributes to enable
9ffffee4 234
49aad941
FG
235hir_analysis_start_function_parameters = start function is not allowed to have type parameters
236 .label = start function cannot have type parameters
353b0b11 237
49aad941
FG
238hir_analysis_start_function_where = start function is not allowed to have a `where` clause
239 .label = start function cannot have a `where` clause
353b0b11 240
49aad941
FG
241hir_analysis_start_not_async = `start` is not allowed to be `async`
242 .label = `start` is not allowed to be `async`
353b0b11 243
49aad941
FG
244hir_analysis_start_not_target_feature = `start` is not allowed to have `#[target_feature]`
245 .label = `start` is not allowed to have `#[target_feature]`
353b0b11 246
49aad941
FG
247hir_analysis_start_not_track_caller = `start` is not allowed to be `#[track_caller]`
248 .label = `start` is not allowed to be `#[track_caller]`
353b0b11 249
49aad941 250hir_analysis_static_specialize = cannot specialize on `'static` lifetime
353b0b11 251
49aad941 252hir_analysis_substs_on_overridden_impl = could not resolve substs on overridden impl
353b0b11 253
fe692bf9
FG
254hir_analysis_tait_forward_compat = item constrains opaque type that is not in its signature
255 .note = this item must mention the opaque type in its signature in order to be able to register hidden types
256
49aad941 257hir_analysis_target_feature_on_main = `main` function is not allowed to have `#[target_feature]`
353b0b11 258
49aad941 259hir_analysis_too_large_static = extern static is too large for the current architecture
353b0b11 260
49aad941
FG
261hir_analysis_track_caller_on_main = `main` function is not allowed to be `#[track_caller]`
262 .suggestion = remove this annotation
353b0b11 263
49aad941
FG
264hir_analysis_trait_object_declared_with_no_traits =
265 at least one trait is required for an object type
266 .alias_span = this alias does not contain a trait
353b0b11 267
49aad941
FG
268hir_analysis_transparent_enum_variant = transparent enum needs exactly one variant, but has {$number}
269 .label = needs exactly one variant, but has {$number}
270 .many_label = too many variants in `{$path}`
271 .multi_label = variant here
353b0b11 272
49aad941
FG
273hir_analysis_transparent_non_zero_sized = transparent {$desc} needs at most one non-zero-sized field, but has {$field_count}
274 .label = needs at most one non-zero-sized field, but has {$field_count}
275 .labels = this field is non-zero-sized
353b0b11 276
49aad941
FG
277hir_analysis_transparent_non_zero_sized_enum = the variant of a transparent {$desc} needs at most one non-zero-sized field, but has {$field_count}
278 .label = needs at most one non-zero-sized field, but has {$field_count}
279 .labels = this field is non-zero-sized
353b0b11 280
49aad941
FG
281hir_analysis_typeof_reserved_keyword_used =
282 `typeof` is a reserved keyword but unimplemented
283 .suggestion = consider replacing `typeof(...)` with an actual type
284 .label = reserved keyword
353b0b11 285
49aad941
FG
286hir_analysis_unconstrained_opaque_type = unconstrained opaque type
287 .note = `{$name}` must be used in combination with a concrete type within the same {$what}
353b0b11 288
49aad941
FG
289hir_analysis_unrecognized_atomic_operation =
290 unrecognized atomic operation function: `{$op}`
291 .label = unrecognized atomic operation
353b0b11 292
49aad941
FG
293hir_analysis_unrecognized_intrinsic_function =
294 unrecognized intrinsic function: `{$name}`
295 .label = unrecognized intrinsic
353b0b11 296
fe692bf9
FG
297hir_analysis_unused_associated_type_bounds =
298 unnecessary associated type bound for not object safe associated type
299 .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`.
300 .suggestion = remove this bound
301
49aad941
FG
302hir_analysis_value_of_associated_struct_already_specified =
303 the value of the associated type `{$item_name}` (from trait `{$def_path}`) is already specified
304 .label = re-bound here
305 .previous_bound_label = `{$item_name}` bound here first
353b0b11 306
49aad941
FG
307hir_analysis_variadic_function_compatible_convention = C-variadic function must have a compatible calling convention, like {$conventions}
308 .label = C-variadic function must have a compatible calling convention
353b0b11 309
49aad941 310hir_analysis_variances_of = {$variances_of}
353b0b11 311
49aad941
FG
312hir_analysis_where_clause_on_main = `main` function is not allowed to have a `where` clause
313 .label = `main` cannot have a `where` clause
353b0b11 314
49aad941
FG
315hir_analysis_wrong_number_of_generic_arguments_to_intrinsic =
316 intrinsic has wrong number of {$descr} parameters: found {$found}, expected {$expected}
317 .label = expected {$expected} {$descr} {$expected ->
318 [one] parameter
319 *[other] parameters
320 }