Skip to content

deeper rustc_builtin_macros cleanups - #161867

Open
cyrgani wants to merge 8 commits into
rust-lang:mainfrom
cyrgani:builtin-macros-deeper-clean
Open

deeper rustc_builtin_macros cleanups#161867
cyrgani wants to merge 8 commits into
rust-lang:mainfrom
cyrgani:builtin-macros-deeper-clean

Conversation

@cyrgani

@cyrgani cyrgani commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

As a followup to #161464, this contains a few more surface cleanups and begins simplifying the mess that SubstructureFields currently is by removing the StaticFields type in favor of just using the VariantData directly.

@rustbot

rustbot commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Changes to the code generated for builtin derived traits.

cc @nnethercote

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

rustbot commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

r? @adwinwhite

rustbot has assigned @adwinwhite.
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

@Kobzol

Kobzol commented Aug 27, 2026

Copy link
Copy Markdown
Member

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 27, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 27, 2026
@rust-bors

rust-bors Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: cc25c3c (cc25c3c8dae9c6546d9fdd11168f5e7c5715a163)
Base parent: e457a7b (e457a7b0d326d67b4322ef0d11bd715cfaeda48f)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (cc25c3c): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

@bors rollup=never rustc-perf
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 3

Max RSS (memory usage)

Results (primary -1.0%, secondary -3.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.3% [2.3%, 2.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.7% [-3.1%, -2.3%] 2
Improvements ✅
(secondary)
-3.9% [-6.3%, -1.5%] 2
All ❌✅ (primary) -1.0% [-3.1%, 2.3%] 3

Cycles

Results (primary -1.1%, secondary 0.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
-2.1% [-2.4%, -2.0%] 3
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) -1.1% [-2.4%, 2.0%] 4

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 476.343s -> 474.625s (-0.36%)
Artifact size: 402.74 MiB -> 402.73 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 27, 2026
Comment thread compiler/rustc_builtin_macros/src/deriving/generic/mod.rs Outdated
@rust-cloud-vms
rust-cloud-vms Bot force-pushed the builtin-macros-deeper-clean branch from 979ef46 to 40d4c72 Compare August 28, 2026 11:58
@rust-bors

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rust-cloud-vms
rust-cloud-vms Bot force-pushed the builtin-macros-deeper-clean branch from 4178dac to 3c3c3cd Compare September 3, 2026 17:51
@adwinwhite

Copy link
Copy Markdown
Contributor

Looks good. Just be cautious.
@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 9, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 9, 2026
@rust-bors

rust-bors Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: a510775 (a510775f2a232b0a2ba1de120a471b803f4c3bf5)
Base parent: 0d31508 (0d31508599a7814a7044e9a7a871e3dc5f037753)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (a510775): comparison URL.

Overall result: ❌ regressions - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never rustc-perf
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.3% [0.2%, 0.3%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.2%, 0.3%] 3

Max RSS (memory usage)

Results (primary 0.4%, secondary -0.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.2% [0.5%, 2.0%] 2
Regressions ❌
(secondary)
2.9% [2.2%, 3.6%] 2
Improvements ✅
(primary)
-0.4% [-0.5%, -0.4%] 2
Improvements ✅
(secondary)
-7.9% [-7.9%, -7.9%] 1
All ❌✅ (primary) 0.4% [-0.5%, 2.0%] 4

Cycles

Results (primary 0.5%, secondary 2.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.9% [0.4%, 2.6%] 12
Regressions ❌
(secondary)
2.8% [2.8%, 2.8%] 1
Improvements ✅
(primary)
-0.8% [-1.4%, -0.4%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [-1.4%, 2.6%] 16

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 480.949s -> 481.341s (0.08%)
Artifact size: 403.34 MiB -> 403.36 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. 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.

6 participants