1
Fork 0

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
This commit is contained in:
Jubilee 2024-10-07 11:10:52 -07:00 committed by GitHub
commit bd2e7ee976
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 131 additions and 1 deletions

View file

@ -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,
}