about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/messages.ftl
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-19 19:51:06 +0000
committerMichael Goulet <michael@errs.io>2025-02-24 19:34:54 +0000
commit5c5ed92c37a70603e9d45c698898841afacfb25f (patch)
tree89663123f438f1efd133d482a6a5f5adbc587bab /compiler/rustc_hir_analysis/messages.ftl
parent96d966b07aabbf0438489b848b8f039f88bb518e (diff)
downloadrust-5c5ed92c37a70603e9d45c698898841afacfb25f.tar.gz
rust-5c5ed92c37a70603e9d45c698898841afacfb25f.zip
Simplify trait error message for CoercePointee validation
Diffstat (limited to 'compiler/rustc_hir_analysis/messages.ftl')
-rw-r--r--compiler/rustc_hir_analysis/messages.ftl3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/messages.ftl b/compiler/rustc_hir_analysis/messages.ftl
index 98eb4f65e22..6badd290917 100644
--- a/compiler/rustc_hir_analysis/messages.ftl
+++ b/compiler/rustc_hir_analysis/messages.ftl
@@ -99,6 +99,9 @@ hir_analysis_coerce_pointee_not_struct = `derive(CoercePointee)` is only applica
 
 hir_analysis_coerce_pointee_not_transparent = `derive(CoercePointee)` is only applicable to `struct` with `repr(transparent)` layout
 
+hir_analysis_coerce_unsized_field_validity = for `{$ty}` to have a valid implementation of `{$trait_name}`, it must be possible to coerce the field of type `{$field_ty}`
+    .label = `{$field_ty}` must be a pointer, reference, or smart pointer that is allowed to be unsized
+
 hir_analysis_coerce_unsized_may = the trait `{$trait_name}` may only be implemented for a coercion between structures
 
 hir_analysis_coerce_zero = implementing `{$trait_name}` requires a field to be coerced