Skip to content

Avoid inference constraints from opaque blanket impls - #160752

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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)

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

2 participants