8000 Port `#[rustc_pub_transparent]` to the new attribute system by GrigorenkoPV · Pull Request #142600 · rust-lang/rust · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged

Conversation

GrigorenkoPV
Copy link
Contributor
@GrigorenkoPV GrigorenkoPV commented Jun 16, 2025

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.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 16, 2025
@rustbot
Copy link
Collaborator
rustbot commented Jun 16, 2025

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

Some changes occurred in compiler/rustc_attr_data_structures

cc @jdonszelmann

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

@bors
Copy link
Collaborator
bors commented Jun 18, 2025

☔ The latest upstream changes (presumably #138165) made this pull request unmergeable. Please resolve the merge conflicts.

@GrigorenkoPV GrigorenkoPV force-pushed the attributes/rustc_pub_transparent branch from 3a22b8c to 9e7300a Compare June 18, 2025 18:03
@bors
Copy link
Collaborator
bors commented Jun 19, 2025

☔ The latest upstream changes (presumably #142697) made this pull request unmergeable. Please resolve the merge conflicts.

@GrigorenkoPV GrigorenkoPV force-pushed the attributes/rustc_pub_transparent branch from 9e7300a to 9e2493f Compare June 19, 2025 14:40
@@ -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)) => {
Copy link
Contributor

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])

@bors
Copy link
Collaborator
bors commented Jun 20, 2025

☔ The latest upstream changes (presumably #142770) made this pull request unmergeable. Please resolve the merge conflicts.

@GrigorenkoPV GrigorenkoPV force-pushed the attributes/rustc_pub_transparent branch from 9e2493f to b9e3095 Compare June 20, 2025 19:44
@bors
Copy link
Collaborator
bors commented Jun 21, 2025

☔ The latest upstream changes (presumably #142794) made this pull request unmergeable. Please resolve the merge conflicts.

@GrigorenkoPV GrigorenkoPV force-pushed the attributes/rustc_pub_transparent branch from b9e3095 to 71c6b25 Compare June 21, 2025 11:53
@jdonszelmann
Copy link
Contributor

@bors r+ rollup thanks @GrigorenkoPV !

@bors
Copy link
Collaborator
bors commented Jun 21, 2025

📌 Commit 71c6b25 has been approved by jdonszelmann

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 21, 2025
@jdonszelmann
Copy link
Contributor
jdonszelmann commented Jun 21, 2025

welp, unfortunately seems to conflict with the other PRs in the current rollup, gotta rebase when it's merged :/

@jdonszelmann
Copy link
Contributor

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 21, 2025
bors added a commit that referenced this pull request Jun 21, 2025
Rollup of 3 pull requests

Successful merges:

 - #142539 (Port `#[may_dangle]` to the new attribute system)
 - #142690 (expand: Remove some unnecessary generic parameters)
 - #142698 (Improve diagnostics for `concat_bytes!` with C string  literals)

Failed merges:

 - #142600 (Port `#[rustc_pub_transparent]` to the new attribute system)
 - #142776 (All HIR attributes are outer)

r? `@ghost`
`@rustbot` modify labels: rollup
@jdonszelmann
Copy link
Contributor

r=me after rebase

@bors
Copy link
Collaborator
bors commented Jun 21, 2025

☔ The latest upstream changes (presumably #142826) made this pull request unmergeable. Please resolve the merge conflicts.

@GrigorenkoPV GrigorenkoPV force-pushed the attributes/rustc_pub_transparent branch from 71c6b25 to d86d3f3 Compare June 21, 2025 18:53
@GrigorenkoPV
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 21, 2025
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 21, 2025
@jdonszelmann
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator
bors commented Jun 21, 2025

📌 Commit d86d3f3 has been approved by jdonszelmann

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 21, 2025
jdonszelmann added a commit to jdonszelmann/rust that referenced this pull request Jun 21, 2025
…transpa
ED48
rent, r=jdonszelmann

Port `#[rustc_pub_transparent]` to the new attribute system

Very similar to rust-lang#142498.

This is a part of rust-lang#131229, so
r? `@jdonszelmann`

---

For reference, the `#[rustc_pub_transparent]` attribute was created by me back in rust-lang#129487.

As mentioned back in rust-lang#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.
bors added a commit that referenced this pull request Jun 21, 2025
Rollup of 6 pull requests

Successful merges:

 - #140254 (Pass -Cpanic=abort for the panic_abort crate)
 - #142600 (Port `#[rustc_pub_transparent]` to the new attribute system)
 - #142617 (improve search graph docs, reset `encountered_overflow` between reruns)
 - #142641 (Generate symbols.o for proc-macros too)
 - #142776 (All HIR attributes are outer)
 - #142800 (integer docs: remove extraneous text)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 22, 2025
…transparent, r=jdonszelmann

Port `#[rustc_pub_transparent]` to the new attribute system

Very similar to rust-lang#142498.

This is a part of rust-lang#131229, so
r? ``@jdonszelmann``

---

For reference, the `#[rustc_pub_transparent]` attribute was created by me back in rust-lang#129487.

As mentioned back in rust-lang#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.
bors added a commit that referenced this pull request Jun 22, 2025
Rollup of 10 pull requests

Successful merges:

 - #140254 (Pass -Cpanic=abort for the panic_abort crate)
 - #142594 (Add DesugaringKind::FormatLiteral)
 - #142600 (Port `#[rustc_pub_transparent]` to the new attribute system)
 - #142617 (improve search graph docs, reset `encountered_overflow` between reruns)
 - #142641 (Generate symbols.o for proc-macros too)
 - #142747 (rustdoc_json: conversion cleanups)
 - #142776 (All HIR attributes are outer)
 - #142800 (integer docs: remove extraneous text)
 - #142850 (remove asm_goto feature annotation, for it is now stabilized)
 - #142860 (Notify me on tidy changes)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 22, 2025
…transparent, r=jdonszelmann

Port `#[rustc_pub_transparent]` to the new attribute system

Very similar to rust-lang#142498.

This is a part of rust-lang#131229, so
r? ```@jdonszelmann```

---

For reference, the `#[rustc_pub_transparent]` attribute was created by me back in rust-lang#129487.

As mentioned back in rust-lang#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.
bors added a commit that referenced this pull request Jun 22, 2025
Rollup of 9 pull requests

Successful merges:

 - #140254 (Pass -Cpanic=abort for the panic_abort crate)
 - #142600 (Port `#[rustc_pub_transparent]` to the new attribute system)
 - #142617 (improve search graph docs, reset `encountered_overflow` between reruns)
 - #142641 (Generate symbols.o for proc-macros too)
 - #142747 (rustdoc_json: conversion cleanups)
 - #142776 (All HIR attributes are outer)
 - #142800 (integer docs: remove extraneous text)
 - #142850 (remove asm_goto feature annotation, for it is now stabilized)
 - #142860 (Notify me on tidy changes)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jun 22, 2025
Rollup of 10 pull requests

Successful merges:

 - #140254 (Pass -Cpanic=abort for the panic_abort crate)
 - #142600 (Port `#[rustc_pub_transparent]` to the new attribute system)
 - #142617 (improve search graph docs, reset `encountered_overflow` between reruns)
 - #142747 (rustdoc_json: conv
B4A0
ersion cleanups)
 - #142776 (All HIR attributes are outer)
 - #142800 (integer docs: remove extraneous text)
 - #142841 (Enable fmt-write-bloat for Windows)
 - #142845 (Enable textrel-on-minimal-lib for Windows)
 - #142850 (remove asm_goto feature annotation, for it is now stabilized)
 - #142860 (Notify me on tidy changes)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 431a822 into rust-lang:master Jun 22, 2025
10 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jun 22, 2025
rust-timer added a commit that referenced this pull request Jun 22, 2025
Rollup merge of #142600 - GrigorenkoPV:attributes/rustc_pub_transparent, r=jdonszelmann

Port `#[rustc_pub_transparent]` to the new attribute system

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0