Skip to content

expand: Feature gate AST-based attribute macros on expressions and statements - #160577

Open
petrochenkov wants to merge 2 commits into
rust-lang:mainfrom
petrochenkov:astgate
Open

expand: Feature gate AST-based attribute macros on expressions and statements#160577
petrochenkov wants to merge 2 commits into
rust-lang:mainfrom
petrochenkov:astgate

Conversation

@petrochenkov

Copy link
Copy Markdown
Contributor

Right now all of these macros happen to either be unstable or to produce errors when used on expressions and (non-item) statements, but it is safer to feature gate them anyway to avoid unexpected stability holes in the future, because all token-based macros are already feature-gated in these positions.

@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 Aug 5, 2026
@rustbot

rustbot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

r? @khyperia

rustbot has assigned @khyperia.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

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 17 candidates

@khyperia

khyperia commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

📌 Commit be9602c has been approved by khyperia

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 Aug 6, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 6, 2026
expand: Feature gate AST-based attribute macros on expressions and statements

Right now all of these macros happen to either be unstable or to produce errors when used on expressions and (non-item) statements, but it is safer to feature gate them anyway to avoid unexpected stability holes in the future, because all token-based macros are already feature-gated in these positions.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 6, 2026
expand: Feature gate AST-based attribute macros on expressions and statements

Right now all of these macros happen to either be unstable or to produce errors when used on expressions and (non-item) statements, but it is safer to feature gate them anyway to avoid unexpected stability holes in the future, because all token-based macros are already feature-gated in these positions.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 6, 2026
expand: Feature gate AST-based attribute macros on expressions and statements

Right now all of these macros happen to either be unstable or to produce errors when used on expressions and (non-item) statements, but it is safer to feature gate them anyway to avoid unexpected stability holes in the future, because all token-based macros are already feature-gated in these positions.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 6, 2026
expand: Feature gate AST-based attribute macros on expressions and statements

Right now all of these macros happen to either be unstable or to produce errors when used on expressions and (non-item) statements, but it is safer to feature gate them anyway to avoid unexpected stability holes in the future, because all token-based macros are already feature-gated in these positions.
@petrochenkov

Copy link
Copy Markdown
Contributor Author

@bors r-
I'll change the error wording from "custom attributes" to "macro attributes", because the current one is confusing and not entirely correct.

@rust-bors rust-bors Bot 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 Aug 6, 2026
@rust-bors

rust-bors Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#160623), which was unapproved.

View changes since this unapproval

@rustbot

rustbot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@petrochenkov

Copy link
Copy Markdown
Contributor Author

Updated the wording.
@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 Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants