Skip redundant next-solver fulfillment scans - #161477
Conversation
When every pending goal is stalled only on type inference variables older than any vid changed since the last fulfillment pass, skip walking the pending queue. This removes the quadratic rescan from large typeck bodies (rustc#159933) without tracking a set of vids. Int/float/const stalls and opaque-storage count mismatches still take the existing retain_mut path. -Zdisable-fast-paths disables the skip.
|
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
|
Thanks for the pull request, and welcome! The Rust Project has assigned @lcnr (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
typos already allowlists 'unstalled'; the verb form trips CI.
|
Could you say if https://github.com/rust-lang/rust/blob/main/AGENTS.md works with Cursor? |
Unfortunately I'm AFK and cursor remote agents doesn't support skills. |
|
Check this out then, which is the welcome bot's message posted on your other Cursor PR:
|
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Note for @rust-lang/triagebot: the above is missing the LLM policy link that is present e.g. in #161481 (comment) |
The PR adding it (#161393) was only merged 35 minutes ago. The welcome message was posted 1 hour ago. |
|
thanks @Urgau <3 |
Refs #159933
r? lcnr
Next-solver fulfillment still walks the entire pending queue on every
try_evaluate_obligationseven when remaining goals are stalled on type variables older than anything that just changed.This adds a conservative skip:
retain_mutwalk when every pending goal is type-var-only, opaque storage is unchanged, and every infer change is to a newer vidInt/float/const stalls, mixed opaque counts, overflow, and
-Zdisable-fast-pathskeep the existing path.Alternative to #161348: one min/max vid pair instead of two revisions plus an
FxIndexSetof sub-roots.On the #159933 reproducer (
--crate-type=lib --edition=2024 --emit=metadata):