Skip to content

Remove Span from segments of AttrPath - #149790

Merged
bors merged 1 commit into
rust-lang:mainfrom
JonathanBrouwer:attr-path-perf
Jan 5, 2026
Merged

Remove Span from segments of AttrPath#149790
bors merged 1 commit into
rust-lang:mainfrom
JonathanBrouwer:attr-path-perf

Conversation

@JonathanBrouwer

@JonathanBrouwerJonathanBrouwer commented Dec 8, 2025

Copy link
Copy Markdown
Member

r? jdonszelmann

@rustbotrustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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 Dec 8, 2025
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-borsBot added a commit that referenced this pull request Dec 8, 2025
[PERF] How much does lowering the spans in `AttrPath` matter?
@rust-bors

This comment has been minimized.

@rustbotrustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 8, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-borsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: d9eae17 (d9eae17767db0f7c6391226cad0d92eee5466f69, parent: 5bc345055b06dc096b01bc6d1e0cbe92d3cc630e)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d9eae17): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@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.

meanrangecount
Regressions ❌
(primary)
0.3%[0.2%, 0.5%]2
Regressions ❌
(secondary)
1.9%[1.9%, 1.9%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.2%[-0.2%, -0.2%]3
All ❌✅ (primary)0.3%[0.2%, 0.5%]2

Max RSS (memory usage)

Results (primary -1.5%, secondary 3.1%)

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

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
3.1%[3.1%, 3.1%]1
Improvements ✅
(primary)
-1.5%[-1.5%, -1.5%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)-1.5%[-1.5%, -1.5%]1

Cycles

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

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

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-2.6%[-2.6%, -2.6%]1
Improvements ✅
(secondary)
-3.8%[-3.8%, -3.8%]1
All ❌✅ (primary)-2.6%[-2.6%, -2.6%]1

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.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
0.0%[0.0%, 0.0%]4
Improvements ✅
(primary)
-0.0%[-0.0%, -0.0%]6
Improvements ✅
(secondary)
-0.1%[-0.1%, -0.1%]4
All ❌✅ (primary)-0.0%[-0.0%, -0.0%]6

Bootstrap: 473.701s -> 471.996s (-0.36%)
Artifact size: 389.02 MiB -> 389.02 MiB (-0.00%)

@rustbotrustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Dec 9, 2025
@rustbotrustbot added the A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) label Dec 9, 2025
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbotrustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 9, 2025
rust-borsBot added a commit that referenced this pull request Dec 9, 2025
[PERF] How much does lowering the spans in `AttrPath` matter?
@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors try cancel

@rust-bors

rust-borsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors try

rust-borsBot added a commit that referenced this pull request Dec 9, 2025
[PERF] How much does lowering the spans in `AttrPath` matter?
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-borsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f3efcc9 (f3efcc98a6728b73780875235e1a77ae38c2c3ba, parent: 018d26972e523b8d28f9579056185a1713949dfd)

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-borsBot added a commit that referenced this pull request Dec 22, 2025
[PERF] How much does lowering the spans in `AttrPath` matter?
@rustbotrustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 22, 2025
@JonathanBrouwerJonathanBrouwer changed the title [PERF] How much does lowering the spans in AttrPath matter?Remove Span from AttrPathDec 22, 2025
@JonathanBrouwerJonathanBrouwer changed the title Remove Span from AttrPathRemove Span from segments of AttrPathDec 22, 2025
#[derive(Clone, Debug, HashStable_Generic, Encodable, Decodable)]
pub struct AttrPath {
pub segments: Box<[Ident]>,
pub segments: Box<[Symbol]>,

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

This is the core change, everything else is processing the consequences of this line

@JonathanBrouwer
JonathanBrouwer marked this pull request as ready for review December 22, 2025 15:29
@rustbot

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

@rustbotrustbot 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 Dec 22, 2025
@rust-bors

rust-borsBot commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 59abdd0 (59abdd078361aab8213de0ec055b7d34cfc26809, parent: e951f470d76febcc6f0a5b409c509eb77450a336)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (59abdd0): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@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.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.3%[-0.5%, -0.0%]3
All ❌✅ (primary)--0

Max RSS (memory usage)

Results (secondary -0.8%)

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

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.8%[-0.9%, -0.7%]2
All ❌✅ (primary)--0

Cycles

Results (secondary -0.9%)

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

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
2.4%[2.4%, 2.4%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-4.2%[-4.2%, -4.2%]1
All ❌✅ (primary)--0

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.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-0.0%[-0.0%, -0.0%]12
Improvements ✅
(secondary)
-0.0%[-0.0%, -0.0%]1
All ❌✅ (primary)-0.0%[-0.0%, -0.0%]12

Bootstrap: 481.595s -> 480.404s (-0.25%)
Artifact size: 390.31 MiB -> 390.28 MiB (-0.01%)

@rustbotrustbot removed S-waiting-on-perf Status: Waiting on a perf run to be completed. perf-regression Performance regression. labels Dec 22, 2025
@jdonszelmann

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Jan 5, 2026

Copy link
Copy Markdown
Collaborator

📌 Commit 7afba29 has been approved by jdonszelmann

It is now in the queue for this repository.

@borsbors 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 Jan 5, 2026
@KobzolKobzol mentioned this pull request Jan 5, 2026
bors added a commit that referenced this pull request Jan 5, 2026
Rollup of 3 pull requests
Successful merges:
- #149790 (Remove `Span` from segments of `AttrPath`)
- #150384 (Tidying up tests/ui/issues 16 tests [7/N])
- #150697 (relate.rs: tiny cleanup: eliminate temp vars 2)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit b198dff into rust-lang:mainJan 5, 2026
12 checks passed
@rustbotrustbot added this to the 1.94.0 milestone Jan 5, 2026
rust-timer added a commit that referenced this pull request Jan 5, 2026
Rollup merge of #149790 - JonathanBrouwer:attr-path-perf, r=jdonszelmann
Remove `Span` from segments of `AttrPath`
r? jdonszelmann
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 8, 2026
…jdonszelmann
Remove `Span` from segments of `AttrPath`
r? jdonszelmann
rust-borsBot pushed a commit that referenced this pull request Feb 27, 2026
Remove `Span` from segments of `AttrPath`
r? jdonszelmann
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Aug 17, 2026
Rollup of 3 pull requests
Successful merges:
- rust-lang/rust#149790 (Remove `Span` from segments of `AttrPath`)
- rust-lang/rust#150384 (Tidying up tests/ui/issues 16 tests [7/N])
- rust-lang/rust#150697 (relate.rs: tiny cleanup: eliminate temp vars 2)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-clippyRelevant to the Clippy team.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustfmtRelevant to the rustfmt 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

@JonathanBrouwer@rust-timer@rust-log-analyzer@bors@rustbot@jdonszelmann