-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Port #[rustc_pub_transparent]
to the new attribute system
#142600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Port #[rustc_pub_transparent]
to the new attribute system
#142600
Conversation
Some changes occurred in compiler/rustc_passes/src/check_attr.rs Some changes occurred in compiler/rustc_attr_data_structures Some changes occurred in compiler/rustc_attr_parsing |
☔ The latest upstream changes (presumably #138165) made this pull request unmergeable. Please resolve the merge conflicts. |
3a22b8c
to
9e7300a
Compare
☔ The latest upstream changes (presumably #142697) made this pull request unmergeable. Please resolve the merge conflicts. |
9e7300a
to
9e2493f
Compare
@@ -158,6 +158,14 @@ impl<'tcx> CheckAttrVisitor<'tcx> { | |||
Attribute::Parsed(AttributeKind::AsPtr(attr_span)) => { | |||
self.check_applied_to_fn_or_method(hir_id, *attr_span, span, target) | |||
} | |||
&Attribute::Parsed(AttributeKind::PubTransparent(attr_span)) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should get its own method (See my comment on #[may_dangle]
)
☔ The latest upstream changes (presumably #142770) made this pull request unmergeable. Please resolve the merge conflicts. |
Very similar to #142498.
This is a part of #131229, so
r? @jdonszelmann
For reference, the
#[rustc_pub_transparent]
attribute was created by me back in #129487.As mentioned back in #129487 (comment), this attribute does not check that it is applied to an ADT, because it checks that
#[repr(transparent)]
is also applied to the same item, which, in turn, should check for ADT.