Skip to content

Try to mark param env as rigid with the next solver#158643

Open
adwinwhite wants to merge 6 commits into
rust-lang:mainfrom
adwinwhite:rigid-param-env
Open

Try to mark param env as rigid with the next solver#158643
adwinwhite wants to merge 6 commits into
rust-lang:mainfrom
adwinwhite:rigid-param-env

Conversation

@adwinwhite

@adwinwhite adwinwhite commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This PR tries to make normalization of param env behave exactly the same as the old solver.

Notably,

  • we treat the param env used to normalize param env itself as rigid.
  • the normalizes-to term of projection predicate is treated as normalizable rather than rigid.

This fixes some overflow bugs we met in the next solver but unfix some other bugs (existing in the old solver).
See the blessed tests.

r? lcnr

lcnr added 3 commits June 30, 2026 09:30
the old solver doesn't register `TypeOutlives` and `RegionOutlives` goals if `ignoring_regions` is set. The new solver always registers these requirements, so we instead ignore errors caused by these constraints.
@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 Jul 1, 2026
@adwinwhite

adwinwhite commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Haven't blessed tests or added comments.

@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 Jul 1, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 1, 2026
Try to mark param env as rigid with the next solver
@rust-log-analyzer

This comment has been minimized.

@adwinwhite

Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors

rust-bors Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

@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 Jul 1, 2026
Try to mark param env as rigid with the next solver
@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 0abe2a0 (0abe2a0937c875c08c170438a9afec1fecf7de22)
Base parent: 17aa775 (17aa77551e89d5e80d4b506c9a32fc151264b8e4)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (0abe2a0): 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% [1.2%, 2.8%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-2.5%, -0.1%] 8
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -0.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)
2.8% [2.8%, 2.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.8% [-1.9%, -1.7%] 3
All ❌✅ (primary) - - 0

Cycles

Results (secondary -0.7%)

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.7% [3.7%, 3.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.2%, -2.0%] 3
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 486.291s -> 497.243s (2.25%)
Artifact size: 393.72 MiB -> 393.24 MiB (-0.12%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jul 1, 2026
@adwinwhite adwinwhite marked this pull request as ready for review July 1, 2026 12:10
@rustbot

rustbot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #' to the PR description to autoclose the issue upon merge.

@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 Jul 1, 2026
@adwinwhite

Copy link
Copy Markdown
Contributor Author

Unsure which minimization is a valid regression test for ml-kem. Part of it should be covered by tachys. Just add my minimization which is very long?

@lcnr

lcnr commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

hmm, good question :3 I think the largest typenum free minimization to make unknown issues easier to detect + all small mimimizations for the separate issues?

might make sense to just have a list of all the minimization and how they cover each other. You want both all smallest and all largest minimizations :3 minimizations should form a poset

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-review Status: Awaiting review from the assignee but also interested parties. 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)

5 participants