Skip to content

Avoid inference constraints from opaque blanket impls - #160752

Open
amirHdev wants to merge 1 commit into
rust-lang:mainfrom
amirHdev:fix-opaque-blanket-guidance
Open

Avoid inference constraints from opaque blanket impls#160752
amirHdev wants to merge 1 commit into
rust-lang:mainfrom
amirHdev:fix-opaque-blanket-guidance

Conversation

@amirHdev

@amirHdev amirHdev commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Fixes rust-lang/trait-system-refactor-initiative#229
should not take inference constraints into account when blanket implementations have been chosen to implement unresolved opaque types
I'm not fully sure whether dropping the constraints from the candidate response is the intended approach here but we still evaluate the candidate and nested goals and return an unconstrained ambiguous response while the opaque self type is unresolved

Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 8, 2026
@amirHdev
amirHdev marked this pull request as ready for review August 9, 2026 11:07
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 9, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 9, 2026
@rustbot

rustbot commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

r? @nnethercote

rustbot has assigned @nnethercote.
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 75 candidates
  • Random selection from 19 candidates

@nnethercote

Copy link
Copy Markdown
Contributor

r? @lcnr

@rustbot rustbot assigned lcnr and unassigned nnethercote Aug 9, 2026
@rust-bors

rust-bors Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #160605) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

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.

blanket impl handling for not-yet-defined opaque types is not uwu

4 participants