Repository navigation
assumptions_on_binders: Test mixed ambiguous ORs - #163219
Dnreikronos wants to merge 1 commit into
Conversation
|
r? @mejrs rustbot has assigned @mejrs. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
2b761e2 to
fa3c593
Compare
This comment has been minimized.
This comment has been minimized.
|
r? @adwinwhite |
|
|
|
oops sorry missed that it was assigned already r? boxyuwu |
|
:3 |
|
with one of @khyperia's PRs it should now be possible to just write |
fa3c593 to
fa63e12
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
yeah, rebased and switched the ambiguous branches to The old setup got ambiguity from an alias whose type placeholder couldn't leave the binder. Now that we can write I kept the other alias branch because it still needs to survive until the root, where the outlives assumption can prove it. Both OR orders are still covered. The case without that assumption still errors, along with the AND that requires ambiguity and the OR where every branch is ambiguous. |
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.
cc @BoxyUwU