2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_unrecognized_atomic_operation =
|
2022-03-31 02:35:17 -05:00
|
|
|
unrecognized atomic operation function: `{$op}`
|
|
|
|
.label = unrecognized atomic operation
|
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_wrong_number_of_generic_arguments_to_intrinsic =
|
2022-03-31 02:35:17 -05:00
|
|
|
intrinsic has wrong number of {$descr} parameters: found {$found}, expected {$expected}
|
|
|
|
.label = expected {$expected} {$descr} {$expected ->
|
|
|
|
[one] parameter
|
|
|
|
*[other] parameters
|
|
|
|
}
|
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_unrecognized_intrinsic_function =
|
2022-03-31 02:35:17 -05:00
|
|
|
unrecognized intrinsic function: `{$name}`
|
|
|
|
.label = unrecognized intrinsic
|
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_lifetimes_or_bounds_mismatch_on_trait =
|
2022-03-31 02:35:17 -05:00
|
|
|
lifetime parameters or bounds on {$item_kind} `{$ident}` do not match the trait declaration
|
|
|
|
.label = lifetimes do not match {$item_kind} in trait
|
2022-08-10 02:42:10 -05:00
|
|
|
.generics_label = lifetimes in impl do not match this {$item_kind} in trait
|
2022-11-28 02:03:57 -06:00
|
|
|
.where_label = this `where` clause might not match the one in the trait
|
|
|
|
.bounds_label = this bound might be missing in the impl
|
2022-03-31 02:35:17 -05:00
|
|
|
|
2022-11-02 19:45:08 -05:00
|
|
|
hir_analysis_async_trait_impl_should_be_async =
|
|
|
|
method `{$method_name}` should be async because the method from the trait is async
|
|
|
|
.trait_item_label = required because the trait method is async
|
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_drop_impl_on_wrong_item =
|
2022-07-21 17:00:15 -05:00
|
|
|
the `Drop` trait may only be implemented for local structs, enums, and unions
|
|
|
|
.label = must be a struct, enum, or union in the current crate
|
2022-03-31 02:35:17 -05:00
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_field_already_declared =
|
2022-03-31 02:35:17 -05:00
|
|
|
field `{$field_name}` is already declared
|
|
|
|
.label = field already declared
|
2022-08-10 02:42:10 -05:00
|
|
|
.previous_decl_label = `{$field_name}` first declared here
|
2022-03-31 02:35:17 -05:00
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_copy_impl_on_type_with_dtor =
|
2022-03-31 02:35:17 -05:00
|
|
|
the trait `Copy` may not be implemented for this type; the type has a destructor
|
|
|
|
.label = `Copy` not allowed on types with destructors
|
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_multiple_relaxed_default_bounds =
|
2022-03-31 02:35:17 -05:00
|
|
|
type parameter has more than one relaxed default bound, only one is supported
|
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_copy_impl_on_non_adt =
|
2022-03-31 02:35:17 -05:00
|
|
|
the trait `Copy` may not be implemented for this type
|
|
|
|
.label = type is not a structure or enumeration
|
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_trait_object_declared_with_no_traits =
|
2022-03-31 02:35:17 -05:00
|
|
|
at least one trait is required for an object type
|
2022-08-10 02:42:10 -05:00
|
|
|
.alias_span = this alias does not contain a trait
|
2022-03-31 02:35:17 -05:00
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_ambiguous_lifetime_bound =
|
2022-03-31 02:35:17 -05:00
|
|
|
ambiguous lifetime bound, explicit lifetime bound required
|
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_assoc_type_binding_not_allowed =
|
2022-03-31 02:35:17 -05:00
|
|
|
associated type bindings are not allowed here
|
|
|
|
.label = associated type not allowed here
|
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_typeof_reserved_keyword_used =
|
2022-03-31 02:35:17 -05:00
|
|
|
`typeof` is a reserved keyword but unimplemented
|
2022-04-07 13:46:53 -05:00
|
|
|
.suggestion = consider replacing `typeof(...)` with an actual type
|
2022-03-31 02:35:17 -05:00
|
|
|
.label = reserved keyword
|
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_value_of_associated_struct_already_specified =
|
2022-03-31 02:35:17 -05:00
|
|
|
the value of the associated type `{$item_name}` (from trait `{$def_path}`) is already specified
|
|
|
|
.label = re-bound here
|
2022-08-10 02:42:10 -05:00
|
|
|
.previous_bound_label = `{$item_name}` bound here first
|
2022-03-31 02:35:17 -05:00
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_unconstrained_opaque_type = unconstrained opaque type
|
2022-10-21 22:09:49 -05:00
|
|
|
.note = `{$name}` must be used in combination with a concrete type within the same {$what}
|
2022-05-05 21:46:12 -05:00
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_missing_type_params =
|
2022-05-07 01:32:01 -05:00
|
|
|
the type {$parameterCount ->
|
|
|
|
[one] parameter
|
|
|
|
*[other] parameters
|
|
|
|
} {$parameters} must be explicitly specified
|
|
|
|
.label = type {$parameterCount ->
|
|
|
|
[one] parameter
|
|
|
|
*[other] parameters
|
|
|
|
} {$parameters} must be specified for this
|
|
|
|
.suggestion = set the type {$parameterCount ->
|
|
|
|
[one] parameter
|
|
|
|
*[other] parameters
|
|
|
|
} to the desired {$parameterCount ->
|
|
|
|
[one] type
|
|
|
|
*[other] types
|
|
|
|
}
|
2022-08-10 02:42:10 -05:00
|
|
|
.no_suggestion_label = missing {$parameterCount ->
|
2022-05-07 01:32:01 -05:00
|
|
|
[one] reference
|
|
|
|
*[other] references
|
|
|
|
} to {$parameters}
|
|
|
|
.note = because of the default `Self` reference, type parameters must be specified on object types
|
2022-05-07 01:50:01 -05:00
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_manual_implementation =
|
2022-05-07 01:50:01 -05:00
|
|
|
manual implementations of `{$trait_name}` are experimental
|
|
|
|
.label = manual implementations of `{$trait_name}` are experimental
|
|
|
|
.help = add `#![feature(unboxed_closures)]` to the crate attributes to enable
|
2022-05-07 02:14:48 -05:00
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_substs_on_overridden_impl = could not resolve substs on overridden impl
|
2022-08-17 04:47:44 -05:00
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_unused_extern_crate =
|
2022-08-17 04:47:44 -05:00
|
|
|
unused extern crate
|
|
|
|
.suggestion = remove it
|
|
|
|
|
2022-09-28 04:21:33 -05:00
|
|
|
hir_analysis_extern_crate_not_idiomatic =
|
2022-08-17 04:47:44 -05:00
|
|
|
`extern crate` is not idiomatic in the new edition
|
|
|
|
.suggestion = convert it to a `{$msg_code}`
|
2022-08-18 07:14:21 -05:00
|
|
|
|
2022-10-25 13:28:04 -05:00
|
|
|
hir_analysis_const_impl_for_non_const_trait =
|
|
|
|
const `impl` for trait `{$trait_name}` which is not marked with `#[const_trait]`
|
|
|
|
.suggestion = mark `{$trait_name}` as const
|
|
|
|
.note = marking a trait with `#[const_trait]` ensures all default method bodies are `const`
|
|
|
|
.adding = adding a non-const method body in the future would be a breaking change
|
|
|
|
|
|
|
|
hir_analysis_const_bound_for_non_const_trait =
|
|
|
|
~const can only be applied to `#[const_trait]` traits
|
2022-10-27 15:48:41 -05:00
|
|
|
|
2022-10-27 16:29:16 -05:00
|
|
|
hir_analysis_self_in_impl_self =
|
2022-10-27 16:18:26 -05:00
|
|
|
`Self` is not valid in the self type of an impl block
|
2022-10-27 16:29:16 -05:00
|
|
|
.note = replace `Self` with a different type
|
Move linkage type check to HIR analysis and fix semantics issues.
This ensures that the error is printed even for unused variables,
as well as unifying the handling between the LLVM and GCC backends.
This also fixes unusual behavior around exported Rust-defined variables
with linkage attributes. With the previous behavior, it appears to be
impossible to define such a variable such that it can actually be imported
and used by another crate. This is because on the importing side, the
variable is required to be a pointer, but on the exporting side, the
type checker rejects static variables of pointer type because they do
not implement `Sync`. Even if it were possible to import such a type, it
appears that code generation on the importing side would add an unexpected
additional level of pointer indirection, which would break type safety.
This highlighted that the semantics of linkage on Rust-defined variables
is different to linkage on foreign items. As such, we now model the
difference with two different codegen attributes: linkage for Rust-defined
variables, and import_linkage for foreign items.
This change gives semantics to the test
src/test/ui/linkage-attr/auxiliary/def_illtyped_external.rs which was
previously expected to fail to compile. Therefore, convert it into a
test that is expected to successfully compile.
The update to the GCC backend is speculative and untested.
2022-11-23 20:13:30 -06:00
|
|
|
|
|
|
|
hir_analysis_linkage_type =
|
2022-11-23 20:15:50 -06:00
|
|
|
invalid type for variable with `#[linkage]` attribute
|
2022-12-26 18:39:36 -06:00
|
|
|
|
|
|
|
hir_analysis_auto_deref_reached_recursion_limit = reached the recursion limit while auto-dereferencing `{$ty}`
|
|
|
|
.label = deref recursion limit reached
|
|
|
|
.help = consider increasing the recursion limit by adding a `#![recursion_limit = "{$suggested_limit}"]` attribute to your crate (`{$crate_name}`)
|