Skip to content

Add regression test for #151312 - #164542

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
machinedramon:regression-test-151312
Nov 26, 2026
Merged

rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
machinedramon:regression-test-151312

Conversation

@machinedramon

@machinedramon machinedramon commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Adds a regression test for #151312.

The ICE (cannot relate bound region in point_at_chain) was fixed by
#158536, which instantiates the binder instead of using skip_binder when
building the suggestion. That PR only added a test for #158317, which is a
different example, so this case wasn't covered yet.

The test ICEs on nightly-2026-07-01 and only reports E0271 on current master.
I also tried a few variations of the example (free fn, associated fn, closure,
two arguments, nested references) and none of them ICE now.

Closes #151312

r? @lcnr

LLM disclosure

The task itself came from the issue (find the fixing PR and add a test).
I used an LLM to run the bisect, compare the example with the test from
#158536, and to help write the test and draft some texts. I reviewed the
test and the results myself, so I understand the change.

@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 Oct 18, 2026
@rustbot

rustbot commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

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 and our LLM policy for more information.

@adwinwhite adwinwhite left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

//! used to ICE with "cannot relate bound region" in the new solver.
//!
//! Regression test for <https://github.com/rust-lang/rust/issues/151312>.
//@ compile-flags: -Znext-solver

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you put the compile-test annotations at the top and mention which PR actually fixed the ICE in the comments?

And please do the same for the tests in your other PRs and merge them into this PR :>

@rustbot rustbot assigned adwinwhite and unassigned lcnr Nov 17, 2026
@adwinwhite

Copy link
Copy Markdown
Contributor

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 18, 2026
@rustbot

rustbot commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 18, 2026
@jackh726 jackh726 added the llm-assisted An LLM-assisted PR as defined by the LLM policy. Requires ahead-of-time consent by assignee. label Nov 23, 2026
@rustbot

rustbot commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

@machinedramon

Copy link
Copy Markdown
Contributor Author

Hey @adwinwhite, thanks for the review!

I moved the //@ compile-flags to the top and added to the comment
that the ICE was fixed by #158536.

About merging the other tests here: #164541 and #164543 were already
approved by lcnr and merged, so there is nothing left to bring into
this PR. Sorry for the confusion with the three separate PRs.

If you prefer the two commits squashed into one, I can do it.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 25, 2026
@adwinwhite

Copy link
Copy Markdown
Contributor

Thanks!

@bors r+ rollup

@rust-bors

rust-bors Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 3cb7b37 has been approved by adwinwhite

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Nov 26, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 26, 2026
…12, r=adwinwhite

Add regression test for rust-lang#151312

Adds a regression test for rust-lang#151312.

The ICE (`cannot relate bound region` in `point_at_chain`) was fixed by
rust-lang#158536, which instantiates the binder instead of using `skip_binder` when
building the suggestion. That PR only added a test for rust-lang#158317, which is a
different example, so this case wasn't covered yet.

The test ICEs on nightly-2026-07-01 and only reports E0271 on current master.
I also tried a few variations of the example (free fn, associated fn, closure,
two arguments, nested references) and none of them ICE now.

Closes rust-lang#151312

r? @lcnr

### LLM disclosure
The task itself came from the issue (find the fixing PR and add a test).
I used an LLM to run the bisect, compare the example with the test from
rust-lang#158536, and to help write the test and draft some texts. I reviewed the
test and the results myself, so I understand the change.
rust-bors Bot pushed a commit that referenced this pull request Nov 26, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #164252 (Share retain implementation between Vec and VecDeque)
 - #166171 (borrowck: Fix Reborrow ICE on types with several lifetimes)
 - #166506 (traits: Fix dead match arm for String type suggestions.)
 - #164542 (Add regression test for #151312)
 - #165651 (compiletest: Further clean up directive parsing)
 - #166196 (autodiff: don't ICE on invalid macro arguments)
 - #166556 (remove `Box::into_boxed_slice`)
rust-bors Bot pushed a commit that referenced this pull request Nov 26, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #164252 (Share retain implementation between Vec and VecDeque)
 - #166008 (fix inconsistent precedence of -Ctarget-feature wrt -Zllvm-target-feature)
 - #166156 (tests: cover proc-macro metadata path remapping)
 - #166171 (borrowck: Fix Reborrow ICE on types with several lifetimes)
 - #166506 (traits: Fix dead match arm for String type suggestions.)
 - #164542 (Add regression test for #151312)
 - #165651 (compiletest: Further clean up directive parsing)
 - #166196 (autodiff: don't ICE on invalid macro arguments)
 - #166556 (remove `Box::into_boxed_slice`)
 - #166562 (docs: add backticks around `!` in primitive docs )
rust-bors Bot pushed a commit that referenced this pull request Nov 26, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #164252 (Share retain implementation between Vec and VecDeque)
 - #166008 (fix inconsistent precedence of -Ctarget-feature wrt -Zllvm-target-feature)
 - #166156 (tests: cover proc-macro metadata path remapping)
 - #166171 (borrowck: Fix Reborrow ICE on types with several lifetimes)
 - #166506 (traits: Fix dead match arm for String type suggestions.)
 - #164542 (Add regression test for #151312)
 - #165651 (compiletest: Further clean up directive parsing)
 - #166196 (autodiff: don't ICE on invalid macro arguments)
 - #166556 (remove `Box::into_boxed_slice`)
 - #166562 (docs: add backticks around `!` in primitive docs )
@rust-bors
rust-bors Bot merged commit 23f3fc7 into rust-lang:main Nov 26, 2026
14 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 26, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 26, 2026
Rollup merge of #164542 - machinedramon:regression-test-151312, r=adwinwhite

Add regression test for #151312

Adds a regression test for #151312.

The ICE (`cannot relate bound region` in `point_at_chain`) was fixed by
#158536, which instantiates the binder instead of using `skip_binder` when
building the suggestion. That PR only added a test for #158317, which is a
different example, so this case wasn't covered yet.

The test ICEs on nightly-2026-07-01 and only reports E0271 on current master.
I also tried a few variations of the example (free fn, associated fn, closure,
two arguments, nested references) and none of them ICE now.

Closes #151312

r? @lcnr

### LLM disclosure
The task itself came from the issue (find the fixing PR and add a test).
I used an LLM to run the bisect, compare the example with the test from
#158536, and to help write the test and draft some texts. I reviewed the
test and the results myself, so I understand the change.
mehmettoplu-rs pushed a commit to mehmettoplu-rs/miri that referenced this pull request Nov 27, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#164252 (Share retain implementation between Vec and VecDeque)
 - rust-lang/rust#166008 (fix inconsistent precedence of -Ctarget-feature wrt -Zllvm-target-feature)
 - rust-lang/rust#166156 (tests: cover proc-macro metadata path remapping)
 - rust-lang/rust#166171 (borrowck: Fix Reborrow ICE on types with several lifetimes)
 - rust-lang/rust#166506 (traits: Fix dead match arm for String type suggestions.)
 - rust-lang/rust#164542 (Add regression test for rust-lang/rust#151312)
 - rust-lang/rust#165651 (compiletest: Further clean up directive parsing)
 - rust-lang/rust#166196 (autodiff: don't ICE on invalid macro arguments)
 - rust-lang/rust#166556 (remove `Box::into_boxed_slice`)
 - rust-lang/rust#166562 (docs: add backticks around `!` in primitive docs )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llm-assisted An LLM-assisted PR as defined by the LLM policy. Requires ahead-of-time consent by assignee. 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.

[ICE]: cannot relate bound region

5 participants