Skip to content

-Znext-solver Eager normalization outside of solver #155767

Draft
adwinwhite wants to merge 9 commits intorust-lang:mainfrom
adwinwhite:eager-norm-outside
Draft

-Znext-solver Eager normalization outside of solver #155767
adwinwhite wants to merge 9 commits intorust-lang:mainfrom
adwinwhite:eager-norm-outside

Conversation

@adwinwhite
Copy link
Copy Markdown
Contributor

@adwinwhite adwinwhite commented Apr 25, 2026

This PR adds a normalization routine for the next solver that behaves the same as the normalization in the old solver.
And it's used to normalize eagerly outside of the next solver.

This is part 2 of modifying the next solver to support eager normalization.

Those test changes are all wording changes, duplicating some errors or reducing some duplicates. But I could have overlooked something.
Notably it fixes the first example of rust-lang/trait-system-refactor-initiative#191, but not the remaining cases.

It's probably easier to review commit by commit.

WIP: maybe remove old deeply_normalize

r? @ghost

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Apr 25, 2026
@matthiaskrgr
Copy link
Copy Markdown
Member

does this fix #151308 ?

@rust-log-analyzer

This comment has been minimized.

@adwinwhite
Copy link
Copy Markdown
Contributor Author

adwinwhite commented Apr 25, 2026

does this fix #151308 ?

Yes, it probably fixes a bunch of issues. And unfix some issues fixed by the next solver? Unsure about that.
Seems tedious to re-triage those labelled fixed-by-the-next-solver 🤔

@adwinwhite
Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 25, 2026
`-Znext-solver` Eager normalization outside of solver
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 25, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 25, 2026

☀️ Try build successful (CI)
Build commit: 59cc905 (59cc90511d0283377de9ba5a516f11853e3c95a9, parent: 7e0430fafc66bd0fdfaff94e65148a1f207438cd)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (59cc905): 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
@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)
2.2% [0.5%, 7.3%] 12
Improvements ✅
(primary)
-0.3% [-0.3%, -0.3%] 2
Improvements ✅
(secondary)
-2.4% [-5.0%, -0.2%] 3
All ❌✅ (primary) -0.3% [-0.3%, -0.3%] 2

Max RSS (memory usage)

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

Cycles

Results (secondary 3.9%)

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

Binary size

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

Bootstrap: 491.487s -> 483.564s (-1.61%)
Artifact size: 394.23 MiB -> 393.40 MiB (-0.21%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants