Skip to content

Shallow resolve ty and const vars to their root vars, attempt 2 - #158447

Merged
rust-bors[bot] merged 9 commits into
rust-lang:mainfrom
jdonszelmann:shallow-resolve-to-root-var
Aug 10, 2026
Merged

Shallow resolve ty and const vars to their root vars, attempt 2#158447
rust-bors[bot] merged 9 commits into
rust-lang:mainfrom
jdonszelmann:shallow-resolve-to-root-var

Conversation

@jdonszelmann

@jdonszelmann jdonszelmann commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

View all comments

r? @lcnr
cc: @ShoyuVanilla

This is attempt 2. There is breakage, but how much? It may be worth it. @lcnr and I discovered today that this PR may have major perf impact on the new trait solver (in attempt 1 this wasn't tested in perf runs). In addition, fixing #158441 makes some tests 12x slower on the old solver, and this PR could mitigate that slowdown. The new solver already fixed this bug, hence we expect the new solver to become much faster with this PR.

Hence, we plan to do a crater and perf run to see just how bad it is.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 26, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 26, 2026
@jdonszelmann
jdonszelmann marked this pull request as ready for review June 26, 2026 13:22
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 26, 2026
@rustbot

rustbot commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 26, 2026
@jdonszelmann

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 Jun 26, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
…try>

Shallow resolve ty and const vars to their root vars, attempt 2
@rust-bors

rust-bors Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 8ac0915 (8ac0915e346f9a2e49ca3951b642c55bd7d1eaab)
Base parent: 40557f6 (40557f6225e337d68c8d4f086557ce54135f5dd9)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8ac0915): comparison URL.

Overall result: ✅ improvements - no action needed

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.

@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)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
-0.3% [-0.5%, -0.1%] 19
Improvements ✅
(secondary)
-3.4% [-7.5%, -0.2%] 38
All ❌✅ (primary) -0.3% [-0.5%, -0.1%] 19

Max RSS (memory usage)

Results (primary -0.8%, 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)
2.3% [2.0%, 2.8%] 3
Improvements ✅
(primary)
-0.8% [-0.9%, -0.8%] 2
Improvements ✅
(secondary)
-4.1% [-4.1%, -4.1%] 1
All ❌✅ (primary) -0.8% [-0.9%, -0.8%] 2

Cycles

Results (primary -2.3%, secondary -2.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)
5.0% [1.5%, 10.5%] 3
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
-3.8% [-6.1%, -2.3%] 20
All ❌✅ (primary) -2.3% [-2.3%, -2.3%] 1

Binary size

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

Bootstrap: 482.935s -> 488.862s (1.23%)
Artifact size: 392.98 MiB -> 395.55 MiB (0.65%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 26, 2026
@lcnr

lcnr commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@craterbot check

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-158447 created and queued.
🤖 Automatically detected try build 8ac0915
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 26, 2026
@craterbot

Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-158447 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot

Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-158447 is completed!
📊 2 regressed and 1 fixed (997455 total)
📊 4979 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-158447/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Jun 30, 2026
@theemathas

theemathas commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

The two crater breakages are identical to #153816 and #153849. See #153869.

@jdonszelmann
jdonszelmann force-pushed the shallow-resolve-to-root-var branch from 73928e3 to f658490 Compare July 8, 2026 12:35
@rustbot

This comment has been minimized.

@jdonszelmann

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.

@jdonszelmann
jdonszelmann force-pushed the shallow-resolve-to-root-var branch from 7ab3eeb to db8cf83 Compare August 10, 2026 08:12
@rustbot

rustbot commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@lcnr

lcnr commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

@bors r+ rollup=never

@rust-bors

rust-bors Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit db8cf83 has been approved by lcnr

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 Aug 10, 2026
@jdonszelmann

Copy link
Copy Markdown
Contributor Author

@bors r-

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 10, 2026
@rust-bors

rust-bors Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

View changes since this unapproval

@rust-log-analyzer

This comment has been minimized.

@jdonszelmann

Copy link
Copy Markdown
Contributor Author

Apparently a test now has nicer output and better notes! awesome :)

@jdonszelmann

Copy link
Copy Markdown
Contributor Author

@bors r=lcnr

@rust-bors

rust-bors Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 042faa5 has been approved by lcnr

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 10, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 10, 2026
@rust-bors

rust-bors Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: lcnr
Duration: 3h 4m 50s
Pushing 7088e4b to main...

@rust-bors
rust-bors Bot merged commit 7088e4b into rust-lang:main Aug 10, 2026
14 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 8a2fbe3 (parent) -> 7088e4b (this PR)

Test differences

Show 6 test diffs

Stage 1

  • [ui (polonius)] tests/ui/coercion/fudge-inference/fudge-eager-resolve-breakage-1.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/coercion/fudge-inference/fudge-eager-resolve-breakage-2.rs: [missing] -> pass (J0)
  • [ui] tests/ui/coercion/fudge-inference/fudge-eager-resolve-breakage-1.rs: [missing] -> pass (J2)
  • [ui] tests/ui/coercion/fudge-inference/fudge-eager-resolve-breakage-2.rs: [missing] -> pass (J2)

Stage 2

  • [ui] tests/ui/coercion/fudge-inference/fudge-eager-resolve-breakage-1.rs: [missing] -> pass (J1)
  • [ui] tests/ui/coercion/fudge-inference/fudge-eager-resolve-breakage-2.rs: [missing] -> pass (J1)

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 7088e4b63a9516ebfbfe2ab2d999cf01a528ac14 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-nopt: 1h 30m -> 2h 26m (+62.2%)
  2. i686-gnu-2: 1h 8m -> 1h 37m (+43.5%)
  3. dist-apple-various: 1h 22m -> 1h 53m (+37.7%)
  4. x86_64-gnu-llvm-21-2: 1h 37m -> 1h 3m (-35.2%)
  5. i686-gnu-nopt-1: 1h 36m -> 2h 9m (+34.0%)
  6. dist-loongarch64-musl: 1h 49m -> 1h 15m (-30.8%)
  7. dist-x86_64-solaris: 1h 19m -> 1h 43m (+29.8%)
  8. dist-i686-linux: 1h 24m -> 1h 49m (+29.2%)
  9. x86_64-gnu-distcheck: 1h 43m -> 2h 10m (+26.7%)
  10. dist-x86_64-msvc: 1h 43m -> 2h 10m (+26.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (7088e4b): 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.4% [-0.5%, -0.2%] 11
Improvements ✅
(secondary)
-3.3% [-7.6%, -0.5%] 43
All ❌✅ (primary) -0.4% [-0.5%, -0.2%] 11

Max RSS (memory usage)

Results (primary -2.4%, secondary -0.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)
4.1% [0.5%, 5.6%] 4
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
-1.8% [-6.7%, -0.4%] 13
All ❌✅ (primary) -2.4% [-2.4%, -2.4%] 1

Cycles

Results (primary -2.0%, secondary -2.2%)

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.6% [0.4%, 0.9%] 6
Improvements ✅
(primary)
-2.0% [-2.0%, -2.0%] 1
Improvements ✅
(secondary)
-2.9% [-6.7%, -0.4%] 25
All ❌✅ (primary) -2.0% [-2.0%, -2.0%] 1

Binary size

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

Bootstrap: 454.914s -> 455.179s (0.06%)
Artifact size: 398.40 MiB -> 398.37 MiB (-0.01%)

rust-bors Bot pushed a commit that referenced this pull request Aug 11, 2026
Use `TyOrConstInferVar` in the next solver, fix #158441



This PR still has a couple percent improvement over main at time of writing (2026-08-10), as shown by the screenshot below. Rebased on #158447, should merge after since its technically required for correctness.

Fixes #158441

<img width="1114" height="375" alt="image" src="https://github.com/user-attachments/assets/188a73d0-5987-48f3-923e-9883396bb1a3" />

> [!NOTE]
> I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.
rust-bors Bot pushed a commit that referenced this pull request Aug 11, 2026
Use `TyOrConstInferVar` in the next solver, fix #158441



This PR still has a couple percent improvement over main at time of writing (2026-08-10), as shown by the screenshot below. Rebased on #158447, should merge after since its technically required for correctness.

Fixes #158441

<img width="1114" height="375" alt="image" src="https://github.com/user-attachments/assets/188a73d0-5987-48f3-923e-9883396bb1a3" />

> [!NOTE]
> I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. to-announce Announce this issue on triage meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants