Skip to content

Add #[rustc_dump_generics] attribute#157384

Open
addiesh wants to merge 5 commits into
rust-lang:mainfrom
addiesh:turbofisherwoman
Open

Add #[rustc_dump_generics] attribute#157384
addiesh wants to merge 5 commits into
rust-lang:mainfrom
addiesh:turbofisherwoman

Conversation

@addiesh
Copy link
Copy Markdown

@addiesh addiesh commented Jun 3, 2026

r? oli-obk

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 3, 2026

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

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

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann, @JonathanBrouwer

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @tshepang

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustc-dev-guide Area: rustc-dev-guide 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 3, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 3, 2026

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @oli-obk (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

Comment thread compiler/rustc_attr_parsing/src/attributes/rustc_dump.rs
Comment thread compiler/rustc_hir_analysis/src/collect/dump.rs Outdated
@addiesh addiesh force-pushed the turbofisherwoman branch from c240b2b to 08cf89c Compare June 3, 2026 15:27
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 3, 2026

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.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 3, 2026

⚠️ Warning ⚠️

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@jdonszelmann jdonszelmann self-assigned this Jun 4, 2026
@jdonszelmann
Copy link
Copy Markdown
Contributor

I can review the attrs part!

Allow(Target::Struct),
Allow(Target::Enum),
Allow(Target::Union),
Allow(Target::Trait),
Copy link
Copy Markdown
Contributor

@jdonszelmann jdonszelmann Jun 4, 2026

Choose a reason for hiding this comment

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

You'll probably want a test using it on a trait some day, because I imagine the interaction can be a bit more involved for that. Im not quite sure how far along this is from proof of concept to done. You might want to initially not support traits if that test gives you trouble?

View changes since the review

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Just added a test for a trait, but it's definitely not exhaustive. Let me know your thoughts.

Comment thread compiler/rustc_attr_parsing/src/attributes/rustc_dump.rs Outdated
Comment thread compiler/rustc_hir_analysis/src/collect/dump.rs Outdated
Comment thread compiler/rustc_attr_parsing/src/attributes/rustc_dump.rs
Comment thread compiler/rustc_hir_analysis/src/collect/dump.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustc-dev-guide Area: rustc-dev-guide 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.

7 participants