Initial impl of repr_packed_without_abi
#13398
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #13375
I've added the lint next to the other attribute-related ones. Not sure if this is the correct place, since while we are looking after the
packed
-attribute (there is nothing we can do about types defined elsewhere), we are more concerned about the type's representation set by the attribute (instead of "duplicate attributes" and such).The lint simply looks at the attributes themselves without concern for the item-kind, since items where
repr
is not allowed end up in a compile-error anyway.I'm somewhat concerned about the level of noise this lint would cause if/when it goes into stable, although it does not come up in
lintcheck
.