Skip to content

less clones and more cleanup for rustc_builtin_macros - #162234

Merged
rust-bors[bot] merged 11 commits into
rust-lang:mainfrom
cyrgani:builtin-macros-clean-3
Sep 13, 2026
Merged

rust-bors[bot] merged 11 commits into
rust-lang:mainfrom
cyrgani:builtin-macros-clean-3

Conversation

@cyrgani

@cyrgani cyrgani commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

View all comments

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-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
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 13, 2026
@rust-bors

rust-bors Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: mu001999
Duration: 2h 54m 28s
Pushing 67e8d9d to main...

@rust-bors
rust-bors Bot merged commit 67e8d9d into rust-lang:main Sep 13, 2026
14 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3fcfc54 (parent) -> 67e8d9d (this PR)

Test differences

Show 4 test diffs

4 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 67e8d9d65f33118199f9749343782cc287426587 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-apple: 1h 28m -> 2h 15m (+53.5%)
  2. test-x86_64-gnu-aux: 1h 47m -> 2h 34m (+42.9%)
  3. test-x86_64-gnu-tools: 50m 39s -> 1h 9m (+37.2%)
  4. test-i686-msvc: 1h 47m -> 2h 27m (+37.2%)
  5. test-i686-gnu-1: 2h 30m -> 1h 35m (-36.8%)
  6. dist-x86_64-musl: 2h 25m -> 1h 33m (-35.6%)
  7. dist-powerpc64-linux-gnu: 1h 11m -> 1h 36m (+34.4%)
  8. test-x86_64-gnu-stable: 2h -> 2h 40m (+33.3%)
  9. dist-x86_64-llvm-mingw: 1h 37m -> 2h 10m (+32.9%)
  10. test-x86_64-gnu-llvm-21-3: 1h 59m -> 1h 20m (-32.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (67e8d9d): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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.4%, -0.1%] 21
Improvements ✅
(secondary)
-0.3% [-0.9%, -0.0%] 13
All ❌✅ (primary) -0.2% [-0.4%, 0.2%] 22

Max RSS (memory usage)

Results (primary 0.8%)

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

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

Cycles

Results (primary -0.0%, secondary 3.3%)

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

mean range count
Regressions ❌
(primary)
1.1% [0.4%, 2.3%] 3
Regressions ❌
(secondary)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
-0.8% [-1.1%, -0.6%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.0% [-1.1%, 2.3%] 7

Binary size

Results (primary 0.0%, secondary -0.0%)

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

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.1%] 4
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 2
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 5
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 4
All ❌✅ (primary) 0.0% [-0.0%, 0.1%] 9

Bootstrap: 495.498s -> 493.573s (-0.39%)
Artifact size: 407.03 MiB -> 406.95 MiB (-0.02%)

@cyrgani
cyrgani deleted the builtin-macros-clean-3 branch September 13, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. 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