Skip to content

Don't return dummy MacroData in get_macro#156151

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
mejrs:non_macro_attr
May 7, 2026
Merged

Don't return dummy MacroData in get_macro#156151
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
mejrs:non_macro_attr

Conversation

@mejrs
Copy link
Copy Markdown
Contributor

@mejrs mejrs commented May 4, 2026

View all comments

I was experimenting with tool attributes and ast manipulation, and wasted some time figuring out that this was happening. AFAIK all users of get_macro are expecting an actual macro (and none were reading the dummy MacroData) so there should be no change in behavior.

@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 May 4, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 4, 2026

r? @JohnTitor

rustbot has assigned @JohnTitor.
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 73 candidates
  • Random selection from 20 candidates

@petrochenkov petrochenkov self-assigned this May 4, 2026
Comment thread compiler/rustc_resolve/src/macros.rs Outdated
@JohnTitor
Copy link
Copy Markdown
Member

r? petrochenkov for further review

Comment thread compiler/rustc_resolve/src/build_reduced_graph.rs Outdated
Comment thread compiler/rustc_resolve/src/build_reduced_graph.rs
@petrochenkov petrochenkov 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 May 5, 2026
@mejrs mejrs force-pushed the non_macro_attr branch from 98db5e2 to a2efa01 Compare May 5, 2026 20:29
@mejrs mejrs 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 May 5, 2026
@rust-log-analyzer

This comment has been minimized.

@mejrs mejrs force-pushed the non_macro_attr branch from a2efa01 to b4d656a Compare May 5, 2026 21:16
Comment thread tests/ui/cfg/reserved-macro-names-rename.rs Outdated
Comment thread compiler/rustc_resolve/src/macros.rs
Comment thread compiler/rustc_resolve/src/build_reduced_graph.rs
@petrochenkov petrochenkov 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 May 6, 2026
@mejrs mejrs force-pushed the non_macro_attr branch from b4d656a to 9ecd36b Compare May 6, 2026 11:48
@mejrs mejrs 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 May 6, 2026
Comment thread compiler/rustc_resolve/src/build_reduced_graph.rs Outdated
Comment thread compiler/rustc_resolve/src/macros.rs
@petrochenkov petrochenkov 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 May 6, 2026
@mejrs mejrs force-pushed the non_macro_attr branch from 9ecd36b to 6312fbd Compare May 6, 2026 12:25
@rust-log-analyzer

This comment has been minimized.

@mejrs mejrs force-pushed the non_macro_attr branch from 6312fbd to facd036 Compare May 6, 2026 12:39
@mejrs mejrs 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 May 6, 2026
@petrochenkov
Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 6, 2026

📌 Commit facd036 has been approved by petrochenkov

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 May 6, 2026
rust-bors Bot pushed a commit that referenced this pull request May 6, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - #156251 (stdarch subtree update)
 - #156151 (Don't return dummy MacroData in `get_macro`)
 - #156211 (tests/ui: allow spaces in hashbrown src normalization)
@rust-bors rust-bors Bot merged commit b1d2262 into rust-lang:main May 7, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 7, 2026
rust-timer added a commit that referenced this pull request May 7, 2026
Rollup merge of #156151 - mejrs:non_macro_attr, r=petrochenkov

Don't return dummy MacroData in `get_macro`

I was experimenting with tool attributes and ast manipulation, and wasted some time figuring out that this was happening. AFAIK all users of `get_macro` are expecting an actual macro (and none were reading the dummy MacroData) so there should be no change in behavior.
github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request Jun 8, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#156251 (stdarch subtree update)
 - rust-lang/rust#156151 (Don't return dummy MacroData in `get_macro`)
 - rust-lang/rust#156211 (tests/ui: allow spaces in hashbrown src normalization)
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.

5 participants