Skip to content

Remove NonOwner variant from AstOwner - #163887

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
aerooneqq:remove-ast-non-owner
Oct 7, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
aerooneqq:remove-ast-non-owner

Conversation

@aerooneqq

@aerooneqq aerooneqq commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

The refactoring extracted from #163495 that should be responsible for memory improvements. And seems logical that enum AstOwner should not contain variant NonOwner.

r? @petrochenkov

@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 Oct 6, 2026
@aerooneqq

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 6, 2026
Remove `NonOwner` variant from `AstOwner`
@rust-bors

rust-bors Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: a23d5fc (a23d5fce84cb9602f797d5695f94b7951213041c)
Base parent: b57eb9a (b57eb9a5fd94f30697f51fc88fbe898e67c7aae6)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (a23d5fc): 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
Regressions ❌
(secondary)
0.3% [0.3%, 0.3%] 1
Improvements ✅
(primary)
-0.7% [-0.9%, -0.2%] 3
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.1%] 7
All ❌✅ (primary) -0.7% [-0.9%, -0.2%] 3

Max RSS (memory usage)

Results (primary -3.0%, 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)
2.0% [1.6%, 2.4%] 3
Improvements ✅
(primary)
-3.0% [-8.0%, -1.0%] 114
Improvements ✅
(secondary)
-3.1% [-5.0%, -1.1%] 25
All ❌✅ (primary) -3.0% [-8.0%, -1.0%] 114

Cycles

Results (primary 2.1%, 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)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
3.4% [2.3%, 4.1%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-6.7% [-9.4%, -4.0%] 2
All ❌✅ (primary) 2.1% [2.1%, 2.1%] 1

Binary size

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

Bootstrap: 489.693s -> 490.731s (0.21%)
Artifact size: 409.33 MiB -> 408.61 MiB (-0.18%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 6, 2026
@aerooneqq
aerooneqq marked this pull request as ready for review October 6, 2026 17:04
@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 Oct 6, 2026
@joshtriplett

Copy link
Copy Markdown
Member

Nice! I was just starting to investigate this, and then found your PR. Thanks!

Great win on max-rss, and a slight instruction-count improvement as well.

@bors r+

@rust-bors

rust-bors Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

📌 Commit cb35723 has been approved by joshtriplett

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 Oct 7, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors rollup=iffy

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 7, 2026
…joshtriplett

Remove `NonOwner` variant from `AstOwner`

The refactoring extracted from rust-lang#163495 that should be responsible for memory improvements. And seems logical that enum `AstOwner` should not contain variant `NonOwner`.

r? @petrochenkov
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 7, 2026
…joshtriplett

Remove `NonOwner` variant from `AstOwner`

The refactoring extracted from rust-lang#163495 that should be responsible for memory improvements. And seems logical that enum `AstOwner` should not contain variant `NonOwner`.

r? @petrochenkov
rust-bors Bot pushed a commit that referenced this pull request Oct 7, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #163887 (Remove `NonOwner` variant from `AstOwner`)
 - #163892 (add revisions for `pass -> [err|ICE]` ui tests `-Znext-solver` )
 - #162156 (add IBM f128 type)
 - #163925 (Submodule update of rustc-perf)
 - #163658 ([PAC] Stop hard coding key and discriminator, consult schema instead)
 - #163854 (Include offset in the alignment check when creating ConstValue::Indirect in GVN)
 - #163874 (explicitly check for fresh vars in canonicalize)
 - #163880 (Don't add pkgs.rustc to PATH in nix dev shell)
 - #163893 (Panic on `StableHash` of a `Path` with `GenericArgs`)
 - #163894 (revisions for TAIT in env bug)
 - #163902 (Clean up Reference annotations that drifted)
 - #163905 (Remove redundant closure in bootstrap)
 - #163921 (abby DSL: implement ambiguity)
 - #163927 (abby DSL: change `where` syntax to `predicates`)
 - #163933 (Add `synchronization` import lib to windows-gnullvm dist)
 - #163937 (Abby test DSL: dont ICE on foralls with unused bound vars)

> [!WARNING]
> This rollup conflicts with pending auto build #163934 and may need to be recreated if the pending build succeeds.
rust-bors Bot pushed a commit that referenced this pull request Oct 7, 2026
Rollup merge of #163887 - aerooneqq:remove-ast-non-owner, r=joshtriplett

Remove `NonOwner` variant from `AstOwner`

The refactoring extracted from #163495 that should be responsible for memory improvements. And seems logical that enum `AstOwner` should not contain variant `NonOwner`.

r? @petrochenkov
@rust-bors
rust-bors Bot merged commit 60be615 into rust-lang:main Oct 7, 2026
15 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 7, 2026
github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request Oct 8, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - rust-lang/rust#163887 (Remove `NonOwner` variant from `AstOwner`)
 - rust-lang/rust#163892 (add revisions for `pass -> [err|ICE]` ui tests `-Znext-solver` )
 - rust-lang/rust#162156 (add IBM f128 type)
 - rust-lang/rust#163925 (Submodule update of rustc-perf)
 - rust-lang/rust#163658 ([PAC] Stop hard coding key and discriminator, consult schema instead)
 - rust-lang/rust#163854 (Include offset in the alignment check when creating ConstValue::Indirect in GVN)
 - rust-lang/rust#163874 (explicitly check for fresh vars in canonicalize)
 - rust-lang/rust#163880 (Don't add pkgs.rustc to PATH in nix dev shell)
 - rust-lang/rust#163893 (Panic on `StableHash` of a `Path` with `GenericArgs`)
 - rust-lang/rust#163894 (revisions for TAIT in env bug)
 - rust-lang/rust#163902 (Clean up Reference annotations that drifted)
 - rust-lang/rust#163905 (Remove redundant closure in bootstrap)
 - rust-lang/rust#163921 (abby DSL: implement ambiguity)
 - rust-lang/rust#163927 (abby DSL: change `where` syntax to `predicates`)
 - rust-lang/rust#163933 (Add `synchronization` import lib to windows-gnullvm dist)
 - rust-lang/rust#163937 (Abby test DSL: dont ICE on foralls with unused bound vars)

> [!WARNING]
> This rollup conflicts with pending auto build #163934 and may need to be recreated if the pending build succeeds.
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Oct 8, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - rust-lang/rust#163887 (Remove `NonOwner` variant from `AstOwner`)
 - rust-lang/rust#163892 (add revisions for `pass -> [err|ICE]` ui tests `-Znext-solver` )
 - rust-lang/rust#162156 (add IBM f128 type)
 - rust-lang/rust#163925 (Submodule update of rustc-perf)
 - rust-lang/rust#163658 ([PAC] Stop hard coding key and discriminator, consult schema instead)
 - rust-lang/rust#163854 (Include offset in the alignment check when creating ConstValue::Indirect in GVN)
 - rust-lang/rust#163874 (explicitly check for fresh vars in canonicalize)
 - rust-lang/rust#163880 (Don't add pkgs.rustc to PATH in nix dev shell)
 - rust-lang/rust#163893 (Panic on `StableHash` of a `Path` with `GenericArgs`)
 - rust-lang/rust#163894 (revisions for TAIT in env bug)
 - rust-lang/rust#163902 (Clean up Reference annotations that drifted)
 - rust-lang/rust#163905 (Remove redundant closure in bootstrap)
 - rust-lang/rust#163921 (abby DSL: implement ambiguity)
 - rust-lang/rust#163927 (abby DSL: change `where` syntax to `predicates`)
 - rust-lang/rust#163933 (Add `synchronization` import lib to windows-gnullvm dist)
 - rust-lang/rust#163937 (Abby test DSL: dont ICE on foralls with unused bound vars)

> [!WARNING]
> This rollup conflicts with pending auto build #163934 and may need to be recreated if the pending build succeeds.
@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 (a4cb38b): 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)
-0.6% [-1.0%, -0.2%] 3
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 3
All ❌✅ (primary) -0.6% [-1.0%, -0.2%] 3

Max RSS (memory usage)

Results (primary -3.4%, secondary -2.1%)

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.4% [-4.1%, -1.1%] 12
Improvements ✅
(secondary)
-2.1% [-3.0%, -1.6%] 4
All ❌✅ (primary) -3.4% [-4.1%, -1.1%] 12

Cycles

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

Binary size

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

Artifact size: 408.60 MiB -> 408.60 MiB (-0.00%)

@rustbot rustbot removed the perf-regression Performance regression. label Oct 8, 2026
makai410 pushed a commit to makai410/rustc_public that referenced this pull request Oct 9, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - rust-lang/rust#163887 (Remove `NonOwner` variant from `AstOwner`)
 - rust-lang/rust#163892 (add revisions for `pass -> [err|ICE]` ui tests `-Znext-solver` )
 - rust-lang/rust#162156 (add IBM f128 type)
 - rust-lang/rust#163925 (Submodule update of rustc-perf)
 - rust-lang/rust#163658 ([PAC] Stop hard coding key and discriminator, consult schema instead)
 - rust-lang/rust#163854 (Include offset in the alignment check when creating ConstValue::Indirect in GVN)
 - rust-lang/rust#163874 (explicitly check for fresh vars in canonicalize)
 - rust-lang/rust#163880 (Don't add pkgs.rustc to PATH in nix dev shell)
 - rust-lang/rust#163893 (Panic on `StableHash` of a `Path` with `GenericArgs`)
 - rust-lang/rust#163894 (revisions for TAIT in env bug)
 - rust-lang/rust#163902 (Clean up Reference annotations that drifted)
 - rust-lang/rust#163905 (Remove redundant closure in bootstrap)
 - rust-lang/rust#163921 (abby DSL: implement ambiguity)
 - rust-lang/rust#163927 (abby DSL: change `where` syntax to `predicates`)
 - rust-lang/rust#163933 (Add `synchronization` import lib to windows-gnullvm dist)
 - rust-lang/rust#163937 (Abby test DSL: dont ICE on foralls with unused bound vars)

> [!WARNING]
> This rollup conflicts with pending auto build #163934 and may need to be recreated if the pending build succeeds.
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