Skip to content

don't ignore ambiguity during MIR type check - #164055

Open
lcnr wants to merge 2 commits into
rust-lang:mainfrom
lcnr:next-solver-soundness-bug
Open

lcnr wants to merge 2 commits into
rust-lang:mainfrom
lcnr:next-solver-soundness-bug

Conversation

@lcnr

@lcnr lcnr commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

fixes #164054

this was previously fixed in #116530 and later reverted in #118736.

It impacts the new solver more than the old one as the new solver depends significantly more on region identity, see the relevant stabilization report section.

The old solver has significantly less region identity dependence. It does rely on region identity when merging candidates during normalization:

// Duplicates can happen inside ParamEnv. In the case, we
// perform a lazy deduplication.
if current == &candidate {
return false;
}

This check results in additional ICE with the old solver while instead triggering the potentially region dependent goals check with the new one

let value = op(&ocx).map_err(|_| {
infcx.tcx.check_potentially_region_dependent_goals(root_def_id).err().unwrap_or_else(

r? types

@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 9, 2026
@lcnr lcnr added the I-types-nominated Nominated for discussion during a types team meeting. label Oct 9, 2026
@rustbot

rustbot commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

🤖 A dedicated #t-types/nominated topic has been opened for humans to discuss this issue 🤖

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@lcnr lcnr closed this Oct 9, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 9, 2026
@lcnr lcnr reopened this Oct 9, 2026
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 9, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

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

I-types-nominated Nominated for discussion during a types team meeting. 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.

MIR borrowck ignores ambiguity in ProvePredicate

4 participants