Skip to content

assumptions_on_binders: Test mixed ambiguous ORs - #163219

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

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.

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_binders passes. 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

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.
@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

Copy link
Copy Markdown
Collaborator

The job test-x86_64-gnu-gcc failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/assumptions_on_binders/mixed-ambiguous-alias-outlives.rs#pass stdout ----

error in revision `pass`: test compilation failed although it shouldn't!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/mixed-ambiguous-alias-outlives.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "-Zcodegen-backend=gcc" "--target=x86_64-unknown-linux-gnu" "--cfg" "pass" "--check-cfg" "cfg(test,FALSE,pass,fail)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/assumptions_on_binders/mixed-ambiguous-alias-outlives.pass" "-Znext-solver=coherence" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
error: unable to satisfy constraints involving placeholders due to unknown implied bounds
##[error]  --> /checkout/tests/ui/assumptions_on_binders/mixed-ambiguous-alias-outlives.rs:21:9
   |

Important

For more information how to resolve CI failures of this job, visit this link.

@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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants