Skip to content

Avoid repeated gated spans snapshots during macro matching - #165663

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
TaKO8Ki:hoist-macro-gating-snapshot
Nov 9, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
TaKO8Ki:hoist-macro-gating-snapshot

Conversation

@TaKO8Ki

@TaKO8Ki TaKO8Ki commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

This removes unnecessary mem::take and mem::swap calls.

r? nnethercote

@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 Nov 8, 2026
@TaKO8Ki

TaKO8Ki commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

@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 Nov 8, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 8, 2026
Avoid repeated gated spans snapshots during macro matching
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 811ea5e (811ea5ebe7172725b5ad0216718616b8edac36aa)
Base parent: 1a4d65f (1a4d65fa9d3ff3990d766c52e741c7027ffa4fc6)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (811ea5e): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@bors rollup=iffy 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)
-1.3% [-3.1%, -0.2%] 22
Improvements ✅
(secondary)
-0.4% [-1.4%, -0.2%] 16
All ❌✅ (primary) -1.3% [-3.1%, -0.2%] 22

Max RSS (memory usage)

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

Cycles

Results (primary -1.6%)

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)
-1.6% [-1.9%, -1.5%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.6% [-1.9%, -1.5%] 3

Binary size

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

Bootstrap: 483.59s -> 484.603s (0.21%)
Artifact size: 406.18 MiB -> 406.20 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 9, 2026
@TaKO8Ki
TaKO8Ki marked this pull request as ready for review November 9, 2026 02:13
@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 Nov 9, 2026
@nnethercote

Copy link
Copy Markdown
Contributor

Nice!

@bors r+

@rust-bors

rust-bors Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 48b0aa8 has been approved by nnethercote

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 Nov 9, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 9, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #165161 (`rustc_builtin_macros` cleanup, part 9)
 - #165663 (Avoid repeated gated spans snapshots during macro matching)
 - #165637 (library: std: process: Make Command::status platform specific)
 - #163571 ([rustdoc] Render `Deref` methods on aliased items)
 - #164712 (Reject unexpanded attributes in attributes)
 - #165516 (Point at array length instead of whole array type)
 - #165674 (Add regression test for issue 118449)
 - #165676 (Make `Proxy` weak reference as it seems that it is not dropped at all)
 - #165695 (Add regression test for unsafe diagnostic attributes)
@rust-bors
rust-bors Bot merged commit 3ce8a80 into rust-lang:main Nov 9, 2026
15 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 9, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 9, 2026
Rollup merge of #165663 - TaKO8Ki:hoist-macro-gating-snapshot, r=nnethercote

Avoid repeated gated spans snapshots during macro matching

This removes unnecessary `mem::take` and `mem::swap` calls.

r? nnethercote
@rust-timer

Copy link
Copy Markdown
Collaborator

Note

This PR was benchmarked as part of triage of its containing rollup: triage URL.

Finished benchmarking commit (713ca2a): 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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.2% [-3.1%, -0.2%] 23
Improvements ✅
(secondary)
-0.4% [-1.4%, -0.1%] 19
All ❌✅ (primary) -1.2% [-3.1%, -0.2%] 23

Max RSS (memory usage)

Results (primary -3.6%)

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.6% [-3.6%, -3.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.6% [-3.6%, -3.6%] 1

Cycles

Results (primary -0.2%)

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

mean range count
Regressions ❌
(primary)
3.2% [2.3%, 4.0%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.8% [-2.0%, -1.5%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-2.0%, 4.0%] 6

Binary size

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

Artifact size: 406.20 MiB -> 407.05 MiB (0.21%)

@TaKO8Ki
TaKO8Ki deleted the hoist-macro-gating-snapshot branch November 10, 2026 12:14
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.

4 participants