assumptions_on_binders: Test mixed ambiguous ORs - #163219
Draft
Dnreikronos wants to merge 1 commit into
Draft
Dnreikronos wants to merge 1 commit into
Dnreikronos wants to merge 1 commit into
Conversation
An OR where one side is an alias outlives that can't leave a non-lifetime binder, and the other side can be proved from the root assumptions, should hold in either order. Also cover the AND case where the ambiguous constraint is still required, and the case where every side of the OR is ambiguous.
Collaborator
|
r? @mejrs rustbot has assigned @mejrs. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot)Important For more information how to resolve CI failures of this job, visit this link. |
Dnreikronos
marked this pull request as draft
September 23, 2026 18:55
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up to #162442. Boxy pointed out that one got superseded by #162935, and yeah, once adwin's PR removes
propagate_ambiguitythere's nothing left for my code change to do. The test still covers a case nothing else does though, so this just moves the test over.The idea is an OR where one side is an alias outlives with a non-lifetime binder, which ends up ambiguous, and the other side is something we can prove from the root assumptions. That should hold no matter which order the OR is in. I also kept the cases that should still error, an AND where the ambiguous part is still required and an OR where every side is ambiguous. adwin mentioned in #162935 they weren't sure what to do with the non-lifetime binder ambiguity yet, so I think it's nice to have something pinning down how it behaves today.
This depends on both #161988 and #162935, so it'll fail until both land. I tested it locally with adwin's branch plus #161988 merged on top and all of
assumptions_on_binderspasses. With only #162935 the pass cases fail, since the root still treats every leaf of an OR as required and reports the ambiguous side even when the other side is fine. I'll rebase once they're in.cc @BoxyUwU