Skip to content

Fix ICE when reporting host-effect errors for const Fn HRTBs in next trait solver#154804

Open
cijiugechu wants to merge 2 commits intorust-lang:mainfrom
cijiugechu:fix/host-effect-hrtb-ice
Open

Fix ICE when reporting host-effect errors for const Fn HRTBs in next trait solver#154804
cijiugechu wants to merge 2 commits intorust-lang:mainfrom
cijiugechu:fix/host-effect-hrtb-ice

Conversation

@cijiugechu
Copy link
Copy Markdown

@cijiugechu cijiugechu commented Apr 4, 2026

Avoid leaking bound vars into the diagnostic selection path for HRTB host-effect predicates.

Closes #151894 .

Avoid feeding a leaked TraitPredicate into Obligation::with and the dummy-binder upcast path during host-effect probing.
@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 4, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 4, 2026

r? @adwinwhite

rustbot has assigned @adwinwhite.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

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

@cijiugechu cijiugechu changed the title Fix ICE in next trait solver when probing const [const] Fn HRTBs Fix ICE when reporting host-effect errors for const Fn HRTBs in the next trait solver Apr 4, 2026
@cijiugechu cijiugechu changed the title Fix ICE when reporting host-effect errors for const Fn HRTBs in the next trait solver Fix ICE when reporting host-effect errors for const Fn HRTBs in next trait solver Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: TraitPredicate has escaping bound vars in select_in_new_trait_solver when reporting error for const [const] Fn HRTB

3 participants