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

@ -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`