Skip to content

Add regression tests for #164253 - #164910

Open
hina-kura49 wants to merge 1 commit into
rust-lang:mainfrom
hina-kura49:add-test-164253
Open

hina-kura49 wants to merge 1 commit into
rust-lang:mainfrom
hina-kura49:add-test-164253

Conversation

@hina-kura49

@hina-kura49 hina-kura49 commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #164253

This adds regression tests for the two examples in #164253. Both used to ICE with -Znext-solver=globally ("failed to resolve instance"). They no longer ICE on current nightly, so the issue can be closed once these tests are in, as suggested in the issue.

@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. labels Oct 25, 2026
@rustbot

rustbot commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @camelid (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 and our LLM policy for more information.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 19 candidates

@rustbot

This comment has been minimized.

With `-Znext-solver=globally`, the examples in the reported issue used
to ICE with "failed to resolve instance" during monomorphization.
They now fail with a normal error instead. The first example was
fixed by an earlier compiler change.

`recursion-issue-164253-1.rs` is the example from the issue
description. It should fail with "reached the recursion limit while
instantiating".

`recursion-issue-164253-2.rs` is a smaller example posted in a comment
on the issue. It should fail with E0275 ("overflow evaluating the
requirement").

Both tests run with the current and the next solver. They are
`build-fail` because the ICE happened during monomorphization, and use
`forbid-output: internal compiler error` so that the ICE cannot come
back unnoticed. `recursion_depth_exceeding_limit` is allowed because it
is unrelated to this issue and is planned to become an error.
@camelid

camelid commented Oct 26, 2026

Copy link
Copy Markdown
Member

Hey, thanks for your PR!

I used an LLM to help write the English in this PR and in the commit message.

Our LLM policy (linked in the bot comment above) prohibits using LLMs to write comments or messages. In this case, your PR description is quite long and a bit hard to follow (probably because of the LLM use). It should really be just a few sentences. Please rewrite the messages yourself and format the test code using rustfmt. Thanks!

@camelid camelid 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-review Status: Awaiting review from the assignee but also interested parties. labels Oct 26, 2026
@hina-kura49

Copy link
Copy Markdown
Contributor Author

@camelid
This is my first time contributing, so I'm not sure if this is the right way to write it or convey my message! I've rewritten it to make it shorter, so please review it again!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ICE]: failed to resolve instance for <&mut &mut &mut &mut &mut &mut....

3 participants