Skip to content

Track per-obligation recursion depth only if there is inference in the new solver #140305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2025

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Apr 25, 2025

Track how many times an obligation has been processed in the fulfillment context by reusing its recursion depth, and only overflow if a singular (root) goal hits the limit.

This also fixes a (probably theoretical at this point) problem where we don't detect pseudo-hangs across select_where_possible calls.

fixes rust-lang/trait-system-refactor-initiative#186

r? lcnr

@rustbot rustbot added 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) labels Apr 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 25, 2025

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@compiler-errors compiler-errors changed the title Track per-obligation recursion depth only if there is inference Track per-obligation recursion depth only if there is inference in the new solver Apr 25, 2025
Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me on the impl, needs comment though

@lcnr
Copy link
Contributor

lcnr commented Apr 25, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 25, 2025

📌 Commit 31c8d10 has been approved by lcnr

It is now in the queue for this repository.

@bors bors 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 Apr 25, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 25, 2025
Track per-obligation recursion depth only if there is inference in the new solver

Track how many times an obligation has been processed in the fulfillment context by reusing its recursion depth, and only overflow if a singular (root) goal hits the limit.

This also fixes a (probably theoretical at this point) problem where we don't detect pseudo-hangs across `select_where_possible` calls.

fixes rust-lang/trait-system-refactor-initiative#186

r? lcnr
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 26, 2025
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#139865 (Stabilize proc_macro::Span::{start,end,line,column}.)
 - rust-lang#140086 (If creating a temporary directory fails with permission denied then retry with backoff)
 - rust-lang#140216 (Document that "extern blocks must be unsafe" in Rust 2024)
 - rust-lang#140220 (Fix detection of main function if there are expressions around it)
 - rust-lang#140253 (Add XtensaAsmPrinter)
 - rust-lang#140272 (Improve error message for `||` (or) in let chains)
 - rust-lang#140305 (Track per-obligation recursion depth only if there is inference in the new solver)
 - rust-lang#140306 (handle specialization in the new trait solver)
 - rust-lang#140308 (stall generator witness obligations: add regression test)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 26, 2025
Track per-obligation recursion depth only if there is inference in the new solver

Track how many times an obligation has been processed in the fulfillment context by reusing its recursion depth, and only overflow if a singular (root) goal hits the limit.

This also fixes a (probably theoretical at this point) problem where we don't detect pseudo-hangs across `select_where_possible` calls.

fixes rust-lang/trait-system-refactor-initiative#186

r? lcnr
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 26, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#139865 (Stabilize proc_macro::Span::{start,end,line,column}.)
 - rust-lang#140086 (If creating a temporary directory fails with permission denied then retry with backoff)
 - rust-lang#140216 (Document that "extern blocks must be unsafe" in Rust 2024)
 - rust-lang#140253 (Add XtensaAsmPrinter)
 - rust-lang#140272 (Improve error message for `||` (or) in let chains)
 - rust-lang#140305 (Track per-obligation recursion depth only if there is inference in the new solver)
 - rust-lang#140306 (handle specialization in the new trait solver)
 - rust-lang#140308 (stall generator witness obligations: add regression test)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f2f4152 into rust-lang:master Apr 26, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 26, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 26, 2025
Rollup merge of rust-lang#140305 - compiler-errors:coerce-loop, r=lcnr

Track per-obligation recursion depth only if there is inference in the new solver

Track how many times an obligation has been processed in the fulfillment context by reusing its recursion depth, and only overflow if a singular (root) goal hits the limit.

This also fixes a (probably theoretical at this point) problem where we don't detect pseudo-hangs across `select_where_possible` calls.

fixes rust-lang/trait-system-refactor-initiative#186

r? lcnr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

barencoder: subtyping overflow
4 participants