SIGN IN SIGN UP

Auto merge of #158436 - jdonszelmann:fast-path-when-adding-goals, r=lcnr

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 https://github.com/rust-lang/rust/pull/158447, should merge after since its technically required for correctness.

Fixes rust-lang/rust#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.
B
bors committed
3d6c19bb9ab4798ecfb2ee943df01a811720fc27