diff options
| author | Jubilee <workingjubilee@gmail.com> | 2024-10-07 11:10:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-07 11:10:52 -0700 |
| commit | bd2e7ee976b23d35dbbf94d273c9588a51db6427 (patch) | |
| tree | 86883d781d676a9e91fa9b89176883e8ea4b410d /compiler/rustc_builtin_macros/src/errors.rs | |
| parent | 7caad6925314911eefe54b040d4bc5be940e8f92 (diff) | |
| parent | aa4f16a6e71fa63a366ffa0981a422eec73f66ca (diff) | |
| download | rust-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/src/errors.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/errors.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_builtin_macros/src/errors.rs b/compiler/rustc_builtin_macros/src/errors.rs index f13ca224a45..639c2aa231c 100644 --- a/compiler/rustc_builtin_macros/src/errors.rs +++ b/compiler/rustc_builtin_macros/src/errors.rs @@ -940,3 +940,10 @@ pub(crate) struct NakedFunctionTestingAttribute { #[label] pub testing_span: Span, } + +#[derive(Diagnostic)] +#[diag(builtin_macros_non_generic_pointee)] +pub(crate) struct NonGenericPointee { + #[primary_span] + pub span: Span, +} |
