Skip to content

assumptions_on_binders: Test mixed ambiguous ORs - #163219

Open
Dnreikronos wants to merge 1 commit into
rust-lang:mainfrom
Dnreikronos:assumptions_on_binders/mixed_ambiguous_or_test
Open

Dnreikronos wants to merge 1 commit into
rust-lang:mainfrom
Dnreikronos:assumptions_on_binders/mixed_ambiguous_or_test

Conversation

@Dnreikronos

@Dnreikronos Dnreikronos commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Follow up to #162442. Boxy pointed out that one got superseded by #162935, and yeah, once adwin's PR removes propagate_ambiguity there'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

@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 Sep 23, 2026
@rustbot

rustbot commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

r? @mejrs

rustbot has assigned @mejrs.
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 77 candidates
  • Random selection from 20 candidates

@rust-log-analyzer

This comment has been minimized.

@Dnreikronos
Dnreikronos marked this pull request as draft September 23, 2026 18:55
@rustbot rustbot 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 Sep 23, 2026
@Dnreikronos
Dnreikronos marked this pull request as ready for review October 3, 2026 16:39
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 3, 2026
@BoxyUwU BoxyUwU assigned BoxyUwU and unassigned mejrs Oct 3, 2026
@Dnreikronos
Dnreikronos force-pushed the assumptions_on_binders/mixed_ambiguous_or_test branch from 2b761e2 to fa3c593 Compare October 8, 2026 11:58
@rustbot

This comment has been minimized.

@mejrs

mejrs commented Oct 8, 2026

Copy link
Copy Markdown
Member

r? @adwinwhite

@rustbot rustbot assigned adwinwhite and unassigned BoxyUwU Oct 8, 2026
@rustbot

rustbot commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

adwinwhite is currently at their maximum review capacity.
They may take a while to respond.

@mejrs

mejrs commented Oct 8, 2026

Copy link
Copy Markdown
Member

oops sorry missed that it was assigned already

r? boxyuwu

@rustbot rustbot assigned BoxyUwU and unassigned adwinwhite Oct 8, 2026
@BoxyUwU

BoxyUwU commented Oct 8, 2026

Copy link
Copy Markdown
Member

:3

@BoxyUwU

BoxyUwU commented Oct 8, 2026

Copy link
Copy Markdown
Member

with one of @khyperia's PRs it should now be possible to just write ambiguity instead of using an alias outlives which indirectly gets rewritten to ambiguity. Can you rebase and then remove the non_lifetime_binder dependency from the tests?

@Dnreikronos
Dnreikronos force-pushed the assumptions_on_binders/mixed_ambiguous_or_test branch from fa3c593 to fa63e12 Compare October 10, 2026 14:07
@rustbot

rustbot commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

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.

@Dnreikronos

Dnreikronos commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor Author

with one of @khyperia's PRs it should now be possible to just write ambiguity instead of using an alias outlives which indirectly gets rewritten to ambiguity. Can you rebase and then remove the non_lifetime_binder dependency from the tests?

yeah, rebased and switched the ambiguous branches to ambiguity. Dropped the extra bound type parameters and non_lifetime_binders too.

The old setup got ambiguity from an alias whose type placeholder couldn't leave the binder. Now that we can write ambiguity directly, the test can skip that whole path. I like this version more because you can see the ambiguous branch right away without having to follow the alias rewrite first.

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.

This branch has not been deployed

No deployments
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants