Skip to content

Rip out old solver coherence - #161491

Open
sjwang05 wants to merge 5 commits into
rust-lang:mainfrom
sjwang05:no-old-coherence
Open

Rip out old solver coherence#161491
sjwang05 wants to merge 5 commits into
rust-lang:mainfrom
sjwang05:no-old-coherence

Conversation

@sjwang05

@sjwang05 sjwang05 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

View all comments

cc #t-types/call-for-participation > rip out old solver coherence support

Probably best reviewed commit-by-commit with ignore-whitespace.

#160668 replaced the last remaining place where old solver was still used by default in coherence with new solver. This PR removes code that was only used during coherence by the old solver, so now new-solver coherence is the only way to do coherence. Hence, passing -Znext-solver=globally and =coherence now do the exact same thing.

We also remove tracking intercrate ambiguity causes, since afaict the new solver uses a completely different path.

There are also still some TypingMode::Coherence match arms that I think are still reachable, hence I didn't mark those as unreachable!().

Everything else is either removing code that is now unreachable, or removing a condition that is now always true.

r? lcnr

@rustbot

rustbot commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/compiletest

cc @jieyouxu

rustc-dev-guide is developed in its own repository. If possible, consider making this change to rust-lang/rustc-dev-guide instead.

cc @BoxyUwU, @tshepang

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 22, 2026
selcx: &mut SelectionContext<'cx, 'tcx>,
#[instrument(level = "debug", skip(infcx), ret)]
fn impl_intersection_has_impossible_obligation<'a, 'tcx>(
infcx: &InferCtxt<'tcx>,

@sjwang05 sjwang05 Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The selcx was only ever used with the old solver, hence we just pass the infcx directly now.

View changes since the review

@rustbot

rustbot commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

clippy is developed in its own repository. If possible, consider making this change to rust-lang/rust-clippy instead.

cc @rust-lang/clippy

miri is developed in its own repository. If the Miri part of this change can be broken out, consider making this change to rust-lang/miri instead. However, if Miri needs adjusting for rustc changes, just ignore this message.

cc @rust-lang/miri

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Aug 22, 2026
@rustbot

This comment has been minimized.

Comment thread compiler/rustc_session/src/options.rs Outdated
@rust-bors

This comment has been minimized.

Comment thread compiler/rustc_session/src/config.rs Outdated
Comment thread compiler/rustc_trait_selection/src/traits/select/mod.rs
@sjwang05
sjwang05 force-pushed the no-old-coherence branch 2 times, most recently from 2214e92 to 9f68a1b Compare August 26, 2026 08:08
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

rustbot commented Aug 26, 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.

Comment thread compiler/rustc_interface/src/tests.rs Outdated
Comment thread compiler/rustc_session/src/config.rs Outdated
Comment thread compiler/rustc_session/src/options.rs Outdated
@@ -1,4 +1,4 @@
//@ compile-flags: -Zassumptions-on-binders
//@ compile-flags: -Zassumptions-on-binders -Znext-solver

@lcnr lcnr Sep 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't require this change

View changes since the review

@sjwang05 sjwang05 Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compiletest always sets -Znext-solver=coherence by default, so if we don't pass -Znext-solver explicitly to override this, we end up with a bunch of warnings that I feel like are spurious and unrelated to the tests themselves. The warning doesn't actually get emitted in regular code that only passes -Zassumptions-on-binders, only for uitests. Which is. fun. (and causes the uitest suite to fail)

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
To only update this specific test, also pass `--test-args assumptions_on_binders/alias_outlives.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/alias_outlives" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored

error: higher-ranked lifetime bound could not be satisfied
##[error]  --> /checkout/tests/ui/assumptions_on_binders/alias_outlives.rs:37:45
   |
LL | const REGIONCK_ENV_FAIL<'a, T: AliasHaver>: ReqTrait<T::Assoc> = todo!()
   |                                             ^^^^^^^^^^^^^^^^^^

error: higher-ranked lifetime bound could not be satisfied
##[error]  --> /checkout/tests/ui/assumptions_on_binders/alias_outlives.rs:61:1
   |
LL | / impl<'a, T: AliasHaver> TestTrait for [Normalizes<(T,)>; 1]
LL | | //~^ ERROR: higher-ranked lifetime bound could not be satisfied
LL | | where
LL | |     T::Assoc: 'a,
   | |_________________^

error: higher-ranked lifetime bound could not be satisfied
##[error]  --> /checkout/tests/ui/assumptions_on_binders/alias_outlives.rs:29:12
   |
LL |     let _: ReqTrait<T::Assoc>;
   |            ^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors
------------------------------------------

---
To only update this specific test, also pass `--test-args assumptions_on_binders/higher-ranked-outlives-issue-157732.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/higher-ranked-outlives-issue-157732.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/higher-ranked-outlives-issue-157732" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zassumptions-on-binders" "-Znext-solver=globally"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored

error: higher-ranked lifetime bound could not be satisfied
---
To only update this specific test, also pass `--test-args assumptions_on_binders/canonical-response-placeholder-assumptions-issue-159889.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/canonical-response-placeholder-assumptions-issue-159889.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/canonical-response-placeholder-assumptions-issue-159889" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver=globally" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored

error: item does not constrain `Foo::{opaque#0}`
---
To only update this specific test, also pass `--test-args assumptions_on_binders/implied_higher_ranked_alias_outlives_assumption.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/implied_higher_ranked_alias_outlives_assumption.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/implied_higher_ranked_alias_outlives_assumption" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored
------------------------------------------

---- [ui] tests/ui/assumptions_on_binders/implied_higher_ranked_alias_outlives_assumption.rs stdout end ----
---- [ui] tests/ui/assumptions_on_binders/missing-placeholder-assumptions-issue-159890.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/missing-placeholder-assumptions-issue-159890/missing-placeholder-assumptions-issue-159890.stderr`
diff of stderr:

+ warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored
+ 
1 error[E0195]: lifetime parameters or bounds on associated function `call_2` do not match the trait declaration
2   --> $DIR/missing-placeholder-assumptions-issue-159890.rs:26:14
3    |


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args assumptions_on_binders/missing-placeholder-assumptions-issue-159890.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/missing-placeholder-assumptions-issue-159890.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/missing-placeholder-assumptions-issue-159890" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2024" "-Znext-solver=globally" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored

error[E0195]: lifetime parameters or bounds on associated function `call_2` do not match the trait declaration
##[error]  --> /checkout/tests/ui/assumptions_on_binders/missing-placeholder-assumptions-issue-159890.rs:26:14
   |
LL |       fn call_2() {}
   |                - lifetimes in impl do not match this associated function in trait
...
LL |       fn call_2<'s, 'cx>() -> Self::Future2<'cx>
   |                ^^^^^^^^^ lifetimes do not match associated function in trait
LL |       //~^ ERROR lifetime parameters or bounds on associated function `call_2` do not match
LL | /     where
LL | |         's: 'cx,
   | |________________- this `where` clause might not match the one in the trait

error[E0046]: not all trait items implemented, missing: `Future2`
##[error]  --> /checkout/tests/ui/assumptions_on_binders/missing-placeholder-assumptions-issue-159890.rs:20:1
   |
LL |       type Future2<'cx>: Future + 'cx;
   |       ------------------------------- `Future2` from trait
...
LL | / impl<FI1, FI2: 'static> IterCaller for UseIter<FI1, FI2>
LL | | //~^ ERROR not all trait items implemented
LL | | where
LL | |     FI1: FutureIterator + 'static + Send,
LL | |     for<'s, 'cx> FI1::Future<'s, 'cx>: Send,
   | |____________________________________________^ missing `Future2` in implementation

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0046, E0195.
For more information about an error, try `rustc --explain E0046`.
---
diff of stderr:

+ warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored
+ 
1 error[E0277]: the trait bound `(): Trait<fn(for<'a> fn(<T as Proj<'a>>::Assoc))>` is not satisfied
2   --> $DIR/placeholder-assumptions-issue-157840.rs:12:9
3    |


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args assumptions_on_binders/placeholder-assumptions-issue-157840.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/placeholder-assumptions-issue-157840.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/placeholder-assumptions-issue-157840" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored

error[E0277]: the trait bound `(): Trait<fn(for<'a> fn(<T as Proj<'a>>::Assoc))>` is not satisfied
##[error]  --> /checkout/tests/ui/assumptions_on_binders/placeholder-assumptions-issue-157840.rs:12:9
   |
LL |     (): Trait<<T as Proj<'a>>::Assoc>,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait<fn(for<'a> fn(<T as Proj<'a>>::Assoc))>` is not implemented for `()`
   |
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
   |
LL |     (): Trait<<T as Proj<'a>>::Assoc>, (): Trait<fn(for<'a> fn(<T as Proj<'a>>::Assoc))>
   |                                        +++++++++++++++++++++++++++++++++++++++++++++++++

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
---
To only update this specific test, also pass `--test-args assumptions_on_binders/resolve-infer-var-wf.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/resolve-infer-var-wf.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/resolve-infer-var-wf" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver=globally" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored
------------------------------------------

---
To only update this specific test, also pass `--test-args assumptions_on_binders/resolved-region-var-max-universe.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/resolved-region-var-max-universe.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/resolved-region-var-max-universe" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored

error[E0425]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/assumptions_on_binders/resolved-region-var-max-universe.rs:23:23
   |
LL |     [(); Parent::CT::<T>]:,
   |                       ^ not found in this scope
   |
help: you might be missing a type parameter
   |
LL | fn check<T>()
---
To only update this specific test, also pass `--test-args assumptions_on_binders/test-infra-works.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/test-infra-works.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/test-infra-works" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored
------------------------------------------

---
To only update this specific test, also pass `--test-args assumptions_on_binders/object-candidate-regions-issue-157729.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/object-candidate-regions-issue-157729.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/object-candidate-regions-issue-157729" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zassumptions-on-binders" "-Znext-solver=globally"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored
------------------------------------------

---- [ui] tests/ui/assumptions_on_binders/object-candidate-regions-issue-157729.rs stdout end ----
---- [ui] tests/ui/assumptions_on_binders/test-infra-fails-properly.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/test-infra-fails-properly/test-infra-fails-properly.stderr`
diff of stderr:

+ warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored
+ 
1 error: expected one of `!`, `(`, `+`, `::`, `:`, or `<`, found `{`
2   --> $DIR/test-infra-fails-properly.rs:15:20
3    |


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args assumptions_on_binders/test-infra-fails-properly.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/test-infra-fails-properly.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/test-infra-fails-properly" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored

error: expected one of `!`, `(`, `+`, `::`, `:`, or `<`, found `{`
##[error]  --> /checkout/tests/ui/assumptions_on_binders/test-infra-fails-properly.rs:15:20
   |
LL |             forall { }
   |                    ^ expected one of `!`, `(`, `+`, `::`, `:`, or `<`

error: expected one of `!`, `(`, `+`, `::`, `:`, or `<`, found `{`
##[error]  --> /checkout/tests/ui/assumptions_on_binders/test-infra-fails-properly.rs:24:20
   |
LL |             forall { }
   |                    ^ expected one of `!`, `(`, `+`, `::`, `:`, or `<`

error: expected lifetime, found keyword `for`
##[error]  --> /checkout/tests/ui/assumptions_on_binders/test-infra-fails-properly.rs:41:12
   |
LL |         T: for<'b> Trait<'b>,
---
   |                ^
   |
   = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
   = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: higher-ranked lifetime bound could not be satisfied
##[error]  --> /checkout/tests/ui/assumptions_on_binders/test-infra-fails-properly.rs:7:9
   |
LL |         'a: 'b
   |         ^^^^^^

error: the lhs of a ty outlives must be a placeholder
##[error]  --> /checkout/tests/ui/assumptions_on_binders/test-infra-fails-properly.rs:34:9
   |
LL |         dyn for<'b> Trait<'b>: 'a,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: it is a (dyn for<'b> Trait<'b> + 'static)
   = note: and here it is `Debug`ged :3 dyn [Binder { value: Trait(Trait<'b>), bound_vars: [Region(BrNamed(DefId(0:11 ~ test_infra_fails_properly[2377]::{test_binder_constraints#1}::'b)))] }] + 'static

error: the lhs of a ty outlives must be a placeholder
##[error]  --> /checkout/tests/ui/assumptions_on_binders/test-infra-fails-properly.rs:50:13
   |
LL |             T: 'a,
   |             ^^^^^
   |
   = note: it is a {type error}
   = note: and here it is `Debug`ged :3 {type error}

error: forall expect clause failed
##[error]  --> /checkout/tests/ui/assumptions_on_binders/test-infra-fails-properly.rs:63:17
   |
LL |                 'c: 'c,
---
               'static,
               /checkout/tests/ui/assumptions_on_binders/test-infra-fails-properly.rs:58:9: 58:15 (#0),
           )

error: bound type test binder constraint must be alias (it's a AliasTyOutlivesViaEnv)
##[error]  --> /checkout/tests/ui/assumptions_on_binders/test-infra-fails-properly.rs:72:15
   |
LL |         for<> T: 'a
   |               ^

error: aborting due to 9 previous errors

For more information about this error, try `rustc --explain E0658`.
------------------------------------------

---- [ui] tests/ui/assumptions_on_binders/test-infra-fails-properly.rs stdout end ----
---- [ui] tests/ui/assumptions_on_binders/type_relation_binders_inside_solver-1.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/type_relation_binders_inside_solver-1/type_relation_binders_inside_solver-1.stderr`
normalized stderr:
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored




The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args assumptions_on_binders/type_relation_binders_inside_solver-1.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/type_relation_binders_inside_solver-1.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/type_relation_binders_inside_solver-1" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored
------------------------------------------

---- [ui] tests/ui/assumptions_on_binders/type_relation_binders_inside_solver-1.rs stdout end ----
---- [ui] tests/ui/assumptions_on_binders/type_relation_binders_inside_solver-3.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/type_relation_binders_inside_solver-3/type_relation_binders_inside_solver-3.stderr`
normalized stderr:
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored




The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args assumptions_on_binders/type_relation_binders_inside_solver-3.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/type_relation_binders_inside_solver-3.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/type_relation_binders_inside_solver-3" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored
------------------------------------------

---- [ui] tests/ui/assumptions_on_binders/type_relation_binders_inside_solver-3.rs stdout end ----
---- [ui] tests/ui/assumptions_on_binders/type_relation_binders_inside_solver-2.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/type_relation_binders_inside_solver-2/type_relation_binders_inside_solver-2.stderr`
normalized stderr:
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored




The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args assumptions_on_binders/type_relation_binders_inside_solver-2.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/assumptions_on_binders/type_relation_binders_inside_solver-2.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--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/aarch64-unknown-linux-gnu/test/ui/assumptions_on_binders/type_relation_binders_inside_solver-2" "-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/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zassumptions-on-binders"
stdout: none
--- stderr -------------------------------
warning: -Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored
------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants