Skip to content

Forward CfgTrace attributes on EII items - #162433

Open
sleepycatcoding wants to merge 1 commit into
rust-lang:mainfrom
sleepycatcoding:fix_cfg_on_eii
Open

Forward CfgTrace attributes on EII items#162433
sleepycatcoding wants to merge 1 commit into
rust-lang:mainfrom
sleepycatcoding:fix_cfg_on_eii

Conversation

@sleepycatcoding

@sleepycatcoding sleepycatcoding commented Sep 7, 2026

Copy link
Copy Markdown

Forwards compiler's synthetic CfgTrace and CfgAttrTrace to EII foreign item and macro. This enables the usage of #[cfg(..)], #[cfg_attr(..)] and cfg_select! on EII.

Fixes #162378.

No LLM was used in the creation of this PR.

@rustbot rustbot added 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 Sep 7, 2026
@rustbot

rustbot commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @mati865 (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Please see the contribution instructions and our LLM policy for more information.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 20 candidates

@mati865

mati865 commented Sep 7, 2026

Copy link
Copy Markdown
Member

@rustbot reroll

@rustbot rustbot assigned dingxiangfei2009 and unassigned mati865 Sep 7, 2026

@mejrs mejrs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread compiler/rustc_builtin_macros/src/eii.rs Outdated

@mejrs mejrs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread tests/ui/eii/cfg_on_eii.rs
Comment thread compiler/rustc_builtin_macros/src/eii.rs Outdated
@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 7, 2026
@rustbot

rustbot commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@sleepycatcoding

Copy link
Copy Markdown
Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 7, 2026

@mejrs mejrs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-bors Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1aaffe8 has been approved by mejrs

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Sep 7, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 8, 2026
…mejrs

Forward CfgTrace attributes on EII items

Forwards compiler's synthetic CfgTrace and CfgAttrTrace to EII foreign item and macro. This enables the usage of `#[cfg(..)]`, `#[cfg_attr(..)]` and `cfg_select!` on EII.

Fixes rust-lang#162378.

No LLM was used in the creation of this PR.
rust-bors Bot pushed a commit that referenced this pull request Sep 8, 2026
…uwer

Rollup of 2 pull requests

Successful merges:

 - #162433 (Forward CfgTrace attributes on EII items)
 - #162447 (Fix myself on .mailmap once and for all)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Cannot use cfg_select! with EII

5 participants