Skip to content

Replace match_span_kind macro with SpanKind - #165805

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
nnethercote:SpanKind
Nov 11, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
nnethercote:SpanKind

Conversation

@nnethercote

@nnethercote nnethercote commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

The macro was written to get around some suboptimal code generation. After the recent span compression overhaul it is no longer needed, and we can use a simpler type to achieve the same goal.

r? @petrochenkov

The macro was written to get around some suboptimal code generation.
After the recent span compression overhaul it is no longer needed, and
we can use a simpler type to achieve the same goal.
@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 11, 2026
@nnethercote

Copy link
Copy Markdown
Contributor 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 11, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 11, 2026
Replace `match_span_kind` macro with `SpanKind`
@rust-bors

rust-bors Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: acc011e (acc011e1979e7e88df7231bc2fc829af927920ea)
Base parent: 9de7469 (9de746938314271db6dbb62dc3b4f07288d07d54)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown

Finished benchmarking commit (acc011e): 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.3% [0.2%, 0.3%] 3
Improvements ✅
(primary)
-0.3% [-0.4%, -0.3%] 2
Improvements ✅
(secondary)
-0.4% [-0.7%, -0.2%] 35
All ❌✅ (primary) -0.3% [-0.4%, -0.3%] 2

Max RSS (memory usage)

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

Cycles

Results (primary -1.7%, secondary -2.5%)

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.7% [-1.7%, -1.7%] 1
Improvements ✅
(secondary)
-2.5% [-2.8%, -2.2%] 2
All ❌✅ (primary) -1.7% [-1.7%, -1.7%] 1

Binary size

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

Bootstrap: 483.908s -> 486.501s (0.54%)
Artifact size: 406.45 MiB -> 406.85 MiB (0.10%)

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

Copy link
Copy Markdown
Contributor Author

I was aiming for perf-neutral, but this is actually a small perf win.

@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 8be779b has been approved by petrochenkov

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

Rollup of 6 pull requests

Successful merges:

 - #165805 (Replace `match_span_kind` macro with `SpanKind`)
 - #165746 (std: don't overflow when rounding up huge thread stack sizes on unix)
 - #165807 (Fix 'simga' typo in char.to_lowercase documentation)
 - #165809 (Update to ar_archive_writer 0.5.5)
 - #165812 (Remove `-Z stack-protector=basic`)
 - #165815 (Adjust `unsized.rs` debuginfo test expected output for cdb `10.0.28000.2957`)
@rust-bors
rust-bors Bot merged commit dc1da85 into rust-lang:main Nov 11, 2026
15 checks passed
rust-bors Bot pushed a commit that referenced this pull request Nov 11, 2026
Rollup merge of #165805 - nnethercote:SpanKind, r=petrochenkov

Replace `match_span_kind` macro with `SpanKind`

The macro was written to get around some suboptimal code generation. After the recent span compression overhaul it is no longer needed, and we can use a simpler type to achieve the same goal.

r? @petrochenkov
@rustbot rustbot added this to the 1.102.0 milestone Nov 11, 2026
@nnethercote
nnethercote deleted the SpanKind branch November 11, 2026 22:47
@rust-timer

Copy link
Copy Markdown

Note

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

Finished benchmarking commit (acd4224): 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.3% [0.3%, 0.3%] 2
Improvements ✅
(primary)
-0.3% [-0.4%, -0.2%] 2
Improvements ✅
(secondary)
-0.4% [-0.7%, -0.2%] 37
All ❌✅ (primary) -0.3% [-0.4%, -0.2%] 2

Max RSS (memory usage)

Results (secondary 3.4%)

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)
3.4% [3.3%, 3.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (secondary 4.3%)

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

Binary size

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

Artifact size: 406.34 MiB -> 407.57 MiB (0.30%)

yawnbo pushed a commit to yawnbo/rust that referenced this pull request Nov 16, 2026
…nathanBrouwer

Rollup of 6 pull requests

Successful merges:

 - rust-lang#165805 (Replace `match_span_kind` macro with `SpanKind`)
 - rust-lang#165746 (std: don't overflow when rounding up huge thread stack sizes on unix)
 - rust-lang#165807 (Fix 'simga' typo in char.to_lowercase documentation)
 - rust-lang#165809 (Update to ar_archive_writer 0.5.5)
 - rust-lang#165812 (Remove `-Z stack-protector=basic`)
 - rust-lang#165815 (Adjust `unsized.rs` debuginfo test expected output for cdb `10.0.28000.2957`)

codegen: avoid CGU invalidation in path dependent debugger visualizer lookup
mehmettoplu-rs pushed a commit to mehmettoplu-rs/rustc_codegen_gcc that referenced this pull request Nov 22, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#165805 (Replace `match_span_kind` macro with `SpanKind`)
 - rust-lang/rust#165746 (std: don't overflow when rounding up huge thread stack sizes on unix)
 - rust-lang/rust#165807 (Fix 'simga' typo in char.to_lowercase documentation)
 - rust-lang/rust#165809 (Update to ar_archive_writer 0.5.5)
 - rust-lang/rust#165812 (Remove `-Z stack-protector=basic`)
 - rust-lang/rust#165815 (Adjust `unsized.rs` debuginfo test expected output for cdb `10.0.28000.2957`)
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