Skip to content

Instatiate binder instead of skipping when suggesting function arg error - #158536

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
ShoyuVanilla:issue-158317
Jul 7, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
ShoyuVanilla:issue-158317

Conversation

@ShoyuVanilla

Copy link
Copy Markdown
Member

Fixes #158317

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 Jun 29, 2026
@ShoyuVanilla ShoyuVanilla changed the title Instatiate binder instead of skipping when suggesting functiom arg error Instatiate binder instead of skipping when suggesting function arg error Jun 29, 2026
@lcnr

lcnr commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1316aa8 has been approved by lcnr

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 6. This pull request will be tested once the tree is reopened.

@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 Jul 6, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 6, 2026
Instatiate binder instead of skipping when suggesting function arg error

Fixes rust-lang#158317

r? lcnr
rust-bors Bot pushed a commit that referenced this pull request Jul 7, 2026
Rollup of 13 pull requests

Successful merges:

 - #158478 (Use correct typing mode in mir building for the next solver)
 - #158796 (Distinguish null reference production from null pointer dereference in UB checks)
 - #158821 (add regression test for late-bound type method probe ICE)
 - #158245 (Update the rustc_perf submodule)
 - #158346 (Prevent rustdoc auto-trait ICEs with `-Znext-solver=globally`)
 - #158536 (Instatiate binder instead of skipping when suggesting function arg error)
 - #158553 (Avoid infinite recursion when trying to build valtrees for self-referential consts)
 - #158679 (Document blocking guarantees for `std::sync`)
 - #158826 (Reorganize `tests/ui/issues` [19/N])
 - #158860 (Delete `impl_def_id` field from `ImplHeader`)
 - #158867 (rewrite `Align::max_for_target` in a more obvious way)
 - #158878 (borrowck: Inline `free_region_constraint_info()` to simplify the code)
 - #158881 (Update mdbook to 0.5.4)
@rust-bors
rust-bors Bot merged commit 2653bfb into rust-lang:main Jul 7, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 7, 2026
rust-timer added a commit that referenced this pull request Jul 7, 2026
Rollup merge of #158536 - ShoyuVanilla:issue-158317, r=lcnr

Instatiate binder instead of skipping when suggesting function arg error

Fixes #158317

r? lcnr
@ShoyuVanilla
ShoyuVanilla deleted the issue-158317 branch July 7, 2026 08:13
Kobzol pushed a commit to Kobzol/rustc_codegen_cranelift that referenced this pull request Jul 23, 2026
Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#158478 (Use correct typing mode in mir building for the next solver)
 - rust-lang/rust#158796 (Distinguish null reference production from null pointer dereference in UB checks)
 - rust-lang/rust#158821 (add regression test for late-bound type method probe ICE)
 - rust-lang/rust#158245 (Update the rustc_perf submodule)
 - rust-lang/rust#158346 (Prevent rustdoc auto-trait ICEs with `-Znext-solver=globally`)
 - rust-lang/rust#158536 (Instatiate binder instead of skipping when suggesting function arg error)
 - rust-lang/rust#158553 (Avoid infinite recursion when trying to build valtrees for self-referential consts)
 - rust-lang/rust#158679 (Document blocking guarantees for `std::sync`)
 - rust-lang/rust#158826 (Reorganize `tests/ui/issues` [19/N])
 - rust-lang/rust#158860 (Delete `impl_def_id` field from `ImplHeader`)
 - rust-lang/rust#158867 (rewrite `Align::max_for_target` in a more obvious way)
 - rust-lang/rust#158878 (borrowck: Inline `free_region_constraint_info()` to simplify the code)
 - rust-lang/rust#158881 (Update mdbook to 0.5.4)
makai410 pushed a commit to makai410/rust that referenced this pull request Oct 1, 2026
Rollup of 13 pull requests

Successful merges:

 - rust-lang#158478 (Use correct typing mode in mir building for the next solver)
 - rust-lang#158796 (Distinguish null reference production from null pointer dereference in UB checks)
 - rust-lang#158821 (add regression test for late-bound type method probe ICE)
 - rust-lang#158245 (Update the rustc_perf submodule)
 - rust-lang#158346 (Prevent rustdoc auto-trait ICEs with `-Znext-solver=globally`)
 - rust-lang#158536 (Instatiate binder instead of skipping when suggesting function arg error)
 - rust-lang#158553 (Avoid infinite recursion when trying to build valtrees for self-referential consts)
 - rust-lang#158679 (Document blocking guarantees for `std::sync`)
 - rust-lang#158826 (Reorganize `tests/ui/issues` [19/N])
 - rust-lang#158860 (Delete `impl_def_id` field from `ImplHeader`)
 - rust-lang#158867 (rewrite `Align::max_for_target` in a more obvious way)
 - rust-lang#158878 (borrowck: Inline `free_region_constraint_info()` to simplify the code)
 - rust-lang#158881 (Update mdbook to 0.5.4)
makai410 pushed a commit to makai410/rustc_public that referenced this pull request Oct 1, 2026
Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#158478 (Use correct typing mode in mir building for the next solver)
 - rust-lang/rust#158796 (Distinguish null reference production from null pointer dereference in UB checks)
 - rust-lang/rust#158821 (add regression test for late-bound type method probe ICE)
 - rust-lang/rust#158245 (Update the rustc_perf submodule)
 - rust-lang/rust#158346 (Prevent rustdoc auto-trait ICEs with `-Znext-solver=globally`)
 - rust-lang/rust#158536 (Instatiate binder instead of skipping when suggesting function arg error)
 - rust-lang/rust#158553 (Avoid infinite recursion when trying to build valtrees for self-referential consts)
 - rust-lang/rust#158679 (Document blocking guarantees for `std::sync`)
 - rust-lang/rust#158826 (Reorganize `tests/ui/issues` [19/N])
 - rust-lang/rust#158860 (Delete `impl_def_id` field from `ImplHeader`)
 - rust-lang/rust#158867 (rewrite `Align::max_for_target` in a more obvious way)
 - rust-lang/rust#158878 (borrowck: Inline `free_region_constraint_info()` to simplify the code)
 - rust-lang/rust#158881 (Update mdbook to 0.5.4)
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.
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
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
…inwhite

Add regression test for #151312

Adds a regression test for rust-lang/rust#151312.

The ICE (`cannot relate bound region` in `point_at_chain`) was fixed by
rust-lang/rust#158536, which instantiates the binder instead of using `skip_binder` when
building the suggestion. That PR only added a test for rust-lang/rust#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/rust#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/rust#158536, and to help write the test and draft some texts. I reviewed the
test and the results myself, so I understand the change.
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.

[ICE]: has escaping bound vars, so it cannot be wrapped in a dummy binder

3 participants