about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/messages.ftl
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-10-07 11:10:52 -0700
committerGitHub <noreply@github.com>2024-10-07 11:10:52 -0700
commitbd2e7ee976b23d35dbbf94d273c9588a51db6427 (patch)
tree86883d781d676a9e91fa9b89176883e8ea4b410d /compiler/rustc_builtin_macros/messages.ftl
parent7caad6925314911eefe54b040d4bc5be940e8f92 (diff)
parentaa4f16a6e71fa63a366ffa0981a422eec73f66ca (diff)
downloadrust-bd2e7ee976b23d35dbbf94d273c9588a51db6427.tar.gz
rust-bd2e7ee976b23d35dbbf94d273c9588a51db6427.zip
Rollup merge of #128721 - Brezak:pointee-in-strange-places, r=pnkfelix
Don't allow the `#[pointee]` attribute where it doesn't belong

Error if the `#[pointee]` attribute is applied to anything but generic type parameters.

Closes #128485
Related to #123430
Diffstat (limited to 'compiler/rustc_builtin_macros/messages.ftl')
-rw-r--r--compiler/rustc_builtin_macros/messages.ftl2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_builtin_macros/messages.ftl b/compiler/rustc_builtin_macros/messages.ftl
index b25892242b5..77cb8dc63c4 100644
--- a/compiler/rustc_builtin_macros/messages.ftl
+++ b/compiler/rustc_builtin_macros/messages.ftl
@@ -235,6 +235,8 @@ builtin_macros_non_exhaustive_default = default variant must be exhaustive
     .label = declared `#[non_exhaustive]` here
     .help = consider a manual implementation of `Default`
 
+builtin_macros_non_generic_pointee = the `#[pointee]` attribute may only be used on generic parameters
+
 builtin_macros_non_unit_default = the `#[default]` attribute may only be used on unit enum variants
     .help = consider a manual implementation of `Default`