Skip to content

Split up attribute parsing code and move data types to rustc_attr_data_structures - #134381

Merged
bors merged 2 commits into
rust-lang:masterfrom
jdonszelmann:move-attribute-types
Dec 17, 2024
Merged

Split up attribute parsing code and move data types to rustc_attr_data_structures#134381
bors merged 2 commits into
rust-lang:masterfrom
jdonszelmann:move-attribute-types

Conversation

@jdonszelmann

@jdonszelmannjdonszelmann commented Dec 16, 2024

Copy link
Copy Markdown
Contributor

This change renames rustc_attr to rustc_attr_parsing, and splits up the parsing code. At the same time, all the data types used move to rustc_attr_data_structures. This is in preparation of also having a third crate: rustc_attr_validation

I initially envisioned this as two separate PRs, but I think doing it in one go reduces the number of ways others would have to rebase their changes on this. However, I can still split them.

r? @oli-obk (we already discussed how this is a first step in a larger plan)

For a more detailed plan on how attributes are going to change, see #131229

Edit: this looks like a giant PR, but the changes are actually rather trivial. Each commit is reviewable on its own, and mostly moves code around. No new logic is added.

@rustbotrustbot added A-rustdoc-json Area: Rustdoc JSON backend 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Dec 16, 2024
@rustbot

Copy link
Copy Markdown
Collaborator

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

Some changes occurred to the CTFE machinery

cc @rust-lang/wg-const-eval

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

@jdonszelmann

Copy link
Copy Markdown
ContributorAuthor

@rustbot label +A-attributes

For the rustdoc changes, I only made that code depend on rustc_attr_parsing instead of rustc_attr. No actual logic changed.

@rustbotrustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Dec 16, 2024
@rust-log-analyzer

This comment has been minimized.

@jdonszelmann

jdonszelmann commented Dec 16, 2024

Copy link
Copy Markdown
ContributorAuthor

well, my last rebase had no conflicts, but clearly it didn't work very well anyway... 1s

@jdonszelmann
jdonszelmannforce-pushed the move-attribute-types branch 3 times, most recently from 7179f3b to ff646adCompareDecember 16, 2024 11:43
@rust-log-analyzer

This comment has been minimized.

Comment threada.out Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

accidentally committed a test file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(even though it was removed in the second commit)

@jdonszelmannjdonszelmannDec 16, 2024

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

oops, yea I had noticed but should've removed it from the first one haha

@rustbotrustbot 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 Dec 16, 2024
@oli-obk

Copy link
Copy Markdown
Contributor

I reviewed some changes and the overall change. I'm just gonna assume all the individual parts have been moved correctly (as no tests have been touched, and the downstream usages are all just import changes, this appears so)

@bors delegate+

r=me with the nit for a clean history

@bors

bors commented Dec 16, 2024

Copy link
Copy Markdown
Collaborator

✌️ @jdonszelmann, you can now approve this pull request!

If @oli-obk told you to "r=me" after making some further change, please make that change, then do @bors r=@oli-obk

@jdonszelmann

Copy link
Copy Markdown
ContributorAuthor

@bors r=@oli-obk

@bors

bors commented Dec 16, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit efb98b6 has been approved by oli-obk

It is now in the queue for this repository.

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 16, 2024
@jieyouxujieyouxu mentioned this pull request Dec 17, 2024
@jieyouxu

Copy link
Copy Markdown
Member

@bors p=6 (conflict-prone)

@jieyouxu

Copy link
Copy Markdown
Member

(conflict-check)

@jieyouxujieyouxu reopened this Dec 17, 2024
@jieyouxu

Copy link
Copy Markdown
Member

@bors r=@oli-obk

@bors

This comment was marked as resolved.

@bors

bors commented Dec 17, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit efb98b6 has been approved by oli-obk

It is now in the queue for this repository.

@bors

bors commented Dec 17, 2024

Copy link
Copy Markdown
Collaborator

⌛ Testing commit efb98b6 with merge a4cb3c8...

@jdonszelmann

Copy link
Copy Markdown
ContributorAuthor

(I'll see if the next few can be less conflict prone lol)

@bors

bors commented Dec 17, 2024

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing a4cb3c8 to master...

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (a4cb3c8): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 770.505s -> 769.242s (-0.16%)
Artifact size: 330.30 MiB -> 330.31 MiB (0.00%)

smoelius added a commit to trailofbits/dylint that referenced this pull request Dec 18, 2024
github-merge-queueBot pushed a commit to trailofbits/dylint that referenced this pull request Dec 18, 2024
@jdonszelmann
jdonszelmann deleted the move-attribute-types branch March 23, 2026 11:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)A-rustdoc-jsonArea: Rustdoc JSON backendmerged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc 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

@jdonszelmann@rustbot@rust-log-analyzer@oli-obk@bors@jieyouxu@rust-timer