Skip to content

Generate obligations when possible instead of rejecting with ambiguity #139955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dingxiangfei2009
Copy link
Contributor

A new mode of type relating is introduced so that obligations are generated instead of outright rejecting projection clauses. This allows project candidates that are sourced from more than one predicates, such as supertrait bounds, provided that they do not conflict each other.

A new mode of type relating is introduced so that obligations
are generated instead of outright rejecting projection clauses.
This allows project candidates that are sourced from more than
one predicates, such as supertrait bounds, provided that they
do not conflict each other.
@rustbot
Copy link
Collaborator

rustbot commented Apr 17, 2025

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

@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. labels Apr 17, 2025
@jieyouxu
Copy link
Member

r? types

@rustbot rustbot added the T-types Relevant to the types team, which will review and decide on the PR/issue. label Apr 17, 2025
@rustbot rustbot assigned jackh726 and unassigned nnethercote Apr 17, 2025
@compiler-errors compiler-errors assigned lcnr and unassigned jackh726 Apr 17, 2025
@lcnr
Copy link
Contributor

lcnr commented Apr 17, 2025

This sort of change requires a lot of care as previous attempts to add deferred projection equality (as in, the thing you're partially implementing) have caused overflow errors. See #96912 for the last attempt in the old solver.

cc the relevant zulip thread, I would like to keep discussions about the issue (and its solution) in one place https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/Make.20projection.20out.20of.20associated.20type/with/512793342

@lcnr lcnr added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 23, 2025
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. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants