rustdoc: use the next solver for blanket impl synthesis by fmease · Pull Request #125907 · rust-lang/rust (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

fmease

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-rustdoc

Relevant to the rustdoc team, which will review and decide on the PR/issue.

labels

Jun 3, 2024

@fmease fmease added the S-blocked

Status: Blocked on something else such as an RFC or other implementation work.

label

Jun 3, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jun 3, 2024

@bors

…t, r=

rustdoc: use the next solver for blanket impl synthesis

Furthermore use an ObligationCtxt instead of operating on an InferCtxt directly and don't drop the obligations generated by the type relating (fixes a FIXME).

Originally I just wanted to submit the infcx→ocx change. However, that regressed tests/rustdoc-ui/ice-blanket-impl-52873.rs (pass→overflow error) because with ocx.select_where_possible we would no longer suppress / defatalize (canonical) overflow errors on the last obligation we register. CC rust-lang#54199 which introduced that special case. Obviously in the next solver overflows are non-fatal incl. ice-blanket-impl-52873.rs. Hence the switch now.

Note that I wanted to hold off on switching to the new solver since it makes rust-lang#114891 go from long I-compiletime to I-compilemem + I-hang + eventual death by the OOM killer. So I don't know maybe we should block this PR on me finding a rustc reproducer for the rustdoc issue rust-lang#114891 (this is on my agenda) to be able to properly investigate the underlying next-solver issue.

jieyouxu added a commit to jieyouxu/rust that referenced this pull request

Jun 3, 2024

@jieyouxu

…ket-impls, r=GuillaumeGomez

rustdoc: add a regression test for a former blanket impl synthesis ICE

Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering).

r? rustdoc

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Jun 3, 2024

@matthiaskrgr

…ket-impls, r=GuillaumeGomez

rustdoc: add a regression test for a former blanket impl synthesis ICE

Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering).

r? rustdoc

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Jun 3, 2024

@matthiaskrgr

…ket-impls, r=GuillaumeGomez

rustdoc: add a regression test for a former blanket impl synthesis ICE

Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering).

r? rustdoc

Noratrieb added a commit to Noratrieb/rust that referenced this pull request

Jun 4, 2024

@Noratrieb

…ket-impls, r=GuillaumeGomez

rustdoc: add a regression test for a former blanket impl synthesis ICE

Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering).

r? rustdoc

Noratrieb added a commit to Noratrieb/rust that referenced this pull request

Jun 4, 2024

@Noratrieb

…ket-impls, r=GuillaumeGomez

rustdoc: add a regression test for a former blanket impl synthesis ICE

Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering).

r? rustdoc

@fmease fmease added S-blocked

Status: Blocked on something else such as an RFC or other implementation work.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Aug 21, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Oct 16, 2024

@bors

…t, r=

rustdoc: use the next solver for blanket impl synthesis

Presumably due to better caching behavior, switching from the old to the next solver drastically improves the compile time on certain inputs. See rust-lang#114891. Fixes rust-lang#114891.

Furthermore use an ObligationCtxt instead of operating on an InferCtxt directly and don't drop the obligations generated by the type relating.

For context, originally I just wanted to submit the infcx→ocx change. However, that regressed tests/rustdoc-ui/ice-blanket-impl-52873.rs (pass→overflow error) because with ocx.select_where_possible we would no longer suppress / defatalize (canonical) overflow errors. CC rust-lang#54199 which introduced that special case. Obviously in the next solver overflows are non-fatal incl. ice-blanket-impl-52873.rs. Hence the switch now.

https://github.com/rust-lang/rust/labels/S-blocked on perf improvements for the next solver.

@fmease

bors added a commit to rust-lang-ci/rust that referenced this pull request

Apr 17, 2025

@bors

…t, r=

rustdoc: use the next solver for blanket impl synthesis

Presumably due to better caching behavior, switching from the old to the next solver drastically improves the compile time on certain inputs. See rust-lang#114891. Fixes rust-lang#114891.

Furthermore use an ObligationCtxt instead of operating on an InferCtxt directly and don't drop the obligations generated by the type relating.

For context, originally I just wanted to submit the infcx→ocx change. However, that regressed tests/rustdoc-ui/ice-blanket-impl-52873.rs (pass→overflow error) because with ocx.select_where_possible we would no longer suppress / defatalize (canonical) overflow errors. CC rust-lang#54199 which introduced that special case. Obviously in the next solver overflows are non-fatal incl. ice-blanket-impl-52873.rs. Hence the switch now.

https://github.com/rust-lang/rust/labels/S-blocked on perf improvements for the next solver.