Skip to content

less clones and more cleanup for rustc_builtin_macros - #162234

Open
cyrgani wants to merge 11 commits into
rust-lang:mainfrom
cyrgani:builtin-macros-clean-3
Open

less clones and more cleanup for rustc_builtin_macros#162234
cyrgani wants to merge 11 commits into
rust-lang:mainfrom
cyrgani:builtin-macros-clean-3

Conversation

@cyrgani

@cyrgani cyrgani commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Followup to #161867, with (hopefully) several small perf improvements.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 3, 2026
@cyrgani cyrgani added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Sep 3, 2026
@panstromek

Copy link
Copy Markdown
Contributor

@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 3, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 3, 2026
less clones and more cleanup for `rustc_builtin_macros`
@rust-bors

rust-bors Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 73366f0 (73366f0da15ddcf8000af24409c8c343bb5c092c)
Base parent: 4fcf397 (4fcf39725a9c99bd495d8c73af83628a256ff9a9)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (73366f0): comparison URL.

Overall result: ❌✅ regressions and improvements - 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.2% [0.2%, 0.2%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-1.0%, -0.2%] 7
All ❌✅ (primary) 0.2% [0.2%, 0.2%] 3

Max RSS (memory usage)

Results (primary 1.2%, secondary 4.4%)

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

mean range count
Regressions ❌
(primary)
1.2% [1.2%, 1.2%] 1
Regressions ❌
(secondary)
4.4% [4.4%, 4.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.2% [1.2%, 1.2%] 1

Cycles

Results (primary -3.7%, secondary -3.8%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.7% [-4.6%, -2.9%] 2
Improvements ✅
(secondary)
-3.8% [-3.8%, -3.8%] 1
All ❌✅ (primary) -3.7% [-4.6%, -2.9%] 2

Binary size

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

Bootstrap: 476.065s -> 474.054s (-0.42%)
Artifact size: 401.18 MiB -> 400.93 MiB (-0.06%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 3, 2026
@rust-bors

This comment has been minimized.

@rust-cloud-vms
rust-cloud-vms Bot force-pushed the builtin-macros-clean-3 branch from fb78a2f to 785ad11 Compare September 4, 2026 11:14
@rust-cloud-vms
rust-cloud-vms Bot force-pushed the builtin-macros-clean-3 branch from dc2a811 to 013cd94 Compare September 11, 2026 18:34
@cyrgani
cyrgani marked this pull request as ready for review September 11, 2026 19:26
@rustbot

rustbot commented Sep 11, 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. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 11, 2026
@rustbot

rustbot commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

r? @mu001999

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

@cyrgani cyrgani removed the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Sep 11, 2026
@saethlin

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 Sep 11, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 11, 2026
less clones and more cleanup for `rustc_builtin_macros`
@rust-bors

rust-bors Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 5790cbb (5790cbb90862bfa31335824bfae32366a833efd1)
Base parent: 3fbb92e (3fbb92e14159dd8b9bdb81e065883d1132e5abb7)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (5790cbb): 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.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.3%, -0.1%] 14
Improvements ✅
(secondary)
-0.3% [-0.9%, -0.1%] 13
All ❌✅ (primary) -0.2% [-0.3%, 0.2%] 15

Max RSS (memory usage)

Results (primary -0.4%, 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)
4.8% [4.8%, 4.8%] 1
Regressions ❌
(secondary)
2.8% [2.5%, 3.1%] 2
Improvements ✅
(primary)
-1.5% [-5.2%, -0.5%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.4% [-5.2%, 4.8%] 6

Cycles

Results (primary 0.1%)

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

mean range count
Regressions ❌
(primary)
1.3% [0.4%, 3.9%] 8
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-2.1%, -0.5%] 11
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [-2.1%, 3.9%] 19

Binary size

Results (primary 0.1%, secondary 0.1%)

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

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.2%] 86
Regressions ❌
(secondary)
0.1% [0.0%, 0.2%] 59
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.2%] 86

Bootstrap: 492.981s -> 494.748s (0.36%)
Artifact size: 406.85 MiB -> 407.67 MiB (0.20%)

@rustbot rustbot removed S-waiting-on-perf Status: Waiting on a perf run to be completed. perf-regression Performance regression. labels Sep 11, 2026

@mu001999 mu001999 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment thread compiler/rustc_builtin_macros/src/deriving/generic/mod.rs Outdated
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 12, 2026
@rustbot

rustbot commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 12, 2026
@rust-cloud-vms
rust-cloud-vms Bot force-pushed the builtin-macros-clean-3 branch from 013cd94 to 42eca86 Compare September 12, 2026 08:39
@cyrgani cyrgani 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 Sep 12, 2026

@mu001999 mu001999 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@bors r+ rollup=never

View changes since this review

@rust-bors

rust-bors Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 42eca86 has been approved by mu001999

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 Sep 12, 2026
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.

6 participants