diff options
| author | Michael Goulet <michael@errs.io> | 2025-02-19 19:10:01 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-02-24 19:34:54 +0000 |
| commit | 96d966b07aabbf0438489b848b8f039f88bb518e (patch) | |
| tree | bb58368257607f249ec5e30ff9e44a33d8210afc /compiler/rustc_hir_analysis/messages.ftl | |
| parent | b6899ab9216d63762ba7f97c8a457dc9047e0a2b (diff) | |
| download | rust-96d966b07aabbf0438489b848b8f039f88bb518e.tar.gz rust-96d966b07aabbf0438489b848b8f039f88bb518e.zip | |
Consolidate and rework CoercePointee and DispatchFromDyn errors
Diffstat (limited to 'compiler/rustc_hir_analysis/messages.ftl')
| -rw-r--r-- | compiler/rustc_hir_analysis/messages.ftl | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/compiler/rustc_hir_analysis/messages.ftl b/compiler/rustc_hir_analysis/messages.ftl index 47d5976be09..98eb4f65e22 100644 --- a/compiler/rustc_hir_analysis/messages.ftl +++ b/compiler/rustc_hir_analysis/messages.ftl @@ -85,6 +85,10 @@ hir_analysis_cmse_output_stack_spill = .note1 = functions with the `{$abi}` ABI must pass their result via the available return registers .note2 = the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size +hir_analysis_coerce_multi = implementing `{$trait_name}` does not allow multiple fields to be coerced + .note = the trait `{$trait_name}` may only be implemented when a single field is being coerced + .label = these fields must be coerced for `{$trait_name}` to be valid + hir_analysis_coerce_pointee_no_field = `CoercePointee` can only be derived on `struct`s with at least one field hir_analysis_coerce_pointee_no_user_validity_assertion = asserting applicability of `derive(CoercePointee)` on a target data is forbidden @@ -97,10 +101,7 @@ hir_analysis_coerce_pointee_not_transparent = `derive(CoercePointee)` is only ap hir_analysis_coerce_unsized_may = the trait `{$trait_name}` may only be implemented for a coercion between structures -hir_analysis_coerce_unsized_multi = implementing the trait `CoerceUnsized` requires multiple coercions - .note = `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced - .coercions_note = currently, {$number} fields need coercions: {$coercions} - .label = requires multiple coercions +hir_analysis_coerce_zero = implementing `{$trait_name}` requires a field to be coerced hir_analysis_coercion_between_struct_same_note = expected coercion between the same definition; expected `{$source_path}`, found `{$target_path}` @@ -139,10 +140,6 @@ hir_analysis_cross_crate_traits = cross-crate traits with a default impl, like ` hir_analysis_cross_crate_traits_defined = cross-crate traits with a default impl, like `{$traits}`, can only be implemented for a struct/enum type defined in the current crate .label = can't implement cross-crate trait for type in another crate -hir_analysis_dispatch_from_dyn_multi = implementing the `DispatchFromDyn` trait requires multiple coercions - .note = the trait `DispatchFromDyn` may only be implemented for a coercion between structures with a single field being coerced - .coercions_note = currently, {$number} fields need coercions: {$coercions} - hir_analysis_dispatch_from_dyn_repr = structs implementing `DispatchFromDyn` may not have `#[repr(packed)]` or `#[repr(C)]` 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 that don't mention type/const generics, and nothing else |
