Skip to content

Remove the NormalizesTo/Projection split#154108

Draft
ShoyuVanilla wants to merge 2 commits intorust-lang:mainfrom
ShoyuVanilla:goodbye-normalizes-to
Draft

Remove the NormalizesTo/Projection split#154108
ShoyuVanilla wants to merge 2 commits intorust-lang:mainfrom
ShoyuVanilla:goodbye-normalizes-to

Conversation

@ShoyuVanilla
Copy link
Copy Markdown
Member

@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Mar 19, 2026
ty::AliasTermKind::ProjectionTy
| ty::AliasTermKind::ProjectionConst
| ty::AliasTermKind::InherentTy
| ty::AliasTermKind::InherentConst
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As the NormalizesTo is going to be replaced by Projection, this function can be called upon some non-projection aliases

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.

an exhaustive match please (and comment)

@rust-log-analyzer

This comment has been minimized.

@ShoyuVanilla ShoyuVanilla force-pushed the goodbye-normalizes-to branch from 5b630c4 to 83d432a Compare March 19, 2026 18:50
// FIXME: Longterm canonical queries should deal with all placeholders
// created inside of the query directly instead of returning them to the
// caller.
let prev_universe = delegate.universe();
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The change here is

  • normal instantiation: unaffected.
  • instantiation inside the very same query: use the max_input_universe instead of the delegate's universe.

Currently, we don't instantiate the canonicalized response within the very same query, but as per rust-lang/trait-system-refactor-initiative#223 (comment) (5. the root of the Projection goal then instantiates this query result inside of the same query using the var_values with the added entry for the new infer var) we should do.

In such cases, the current instantiation is not so idempotent modulo universes.

Suppose that the current query's max_input_universe is U(N) and we have the max universe U(N + 1) when computing the projection goal by here, because we have some higher-kinded binder in the goal,

pub(super) fn compute_goal(&mut self, goal: Goal<I, I::Predicate>) -> QueryResult<I> {
let Goal { param_env, predicate } = goal;
let kind = predicate.kind();
self.enter_forall(kind, |ecx, kind| match kind {

let prev_universe = delegate.universe();
let universes_created_in_query = response.max_universe.index();
for _ in 0..universes_created_in_query {
delegate.create_next_universe();
}

And we have some max universe U(M) in the probe's canonicalized response, instantiating it increases the current query's universe index by M, so it becomes U(N + 1 + M) and the prev_universe is U(N + 1).

Suppose that we have a region var with universe U(i) in the probe's canonical response.
We instantiate it into the universe U(i + N + 1) in the following lines

CanonicalVarValues::instantiate(delegate.cx(), response.var_kinds, |var_values, kind| {
if kind.universe() != ty::UniverseIndex::ROOT {
// A variable from inside a binder of the query. While ideally these shouldn't
// exist at all (see the FIXME at the start of this method), we have to deal with
// them for now.
delegate.instantiate_canonical_var(kind, span, &var_values, |idx| {
prev_universe + idx.index()
})

Then when we finally finishing the query, we canonicalize it as a response, but since our max_input_universe is U(N)

ty::ReVar(vid) => {
debug_assert_eq!(
self.delegate.opportunistic_resolve_lt_var(vid),
r,
"region vid should have been resolved fully before canonicalization"
);
match self.canonicalize_mode {
CanonicalizeMode::Input(_) => CanonicalVarKind::Region(ty::UniverseIndex::ROOT),
CanonicalizeMode::Response { .. } => {
CanonicalVarKind::Region(self.delegate.universe_of_lt(vid).unwrap())
}

CanonicalizeMode::Response { max_input_universe } => {
for var in var_kinds.iter_mut() {
let uv = var.universe();
let new_uv = ty::UniverseIndex::from(
uv.index().saturating_sub(max_input_universe.index()),
);
*var = var.with_updated_universe(new_uv);
}
var_kinds
.iter()
.map(|kind| kind.universe())
.max()
.unwrap_or(ty::UniverseIndex::ROOT)
}

the resulting universe of that region becomes U(i + N + 1 - N) = U(i + 1), increased by 1 from the probe's response.

This might result into a leak check failure or other higher-kinded error. So, we should either do use max_input_universe to instantiate the canonical response from the probe or use the delegate's universe when canonicalizing the final response. I chose the former as it feels more hard to mistake with. (Sorry for the messy language since I'm very tired rn 😅 )

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.

i agree, annoying issue. I think we shouldn't canonicalize an input while inside of a binder, so not immediately clear how to handle higher-kinded Projection goals 🤔 I think this is definitely an issue, not happy with your current fix for it though 😅

Copy link
Copy Markdown
Member Author

@ShoyuVanilla ShoyuVanilla Mar 24, 2026

Choose a reason for hiding this comment

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

Yeah, I'll think about the proper fix 😅
Edit) Looks like the intermediate step you've suggested would be the road to it, right?

}
})
})?;
debug_assert!(resp.value.external_constraints.normalization_nested_goals.is_empty());
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

return Some(

let term = self.next_term_infer_of_kind(goal.predicate.term);
self.eq(goal.param_env, goal.predicate.term, term)?;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm adding another fresh inference var to the Projection goal's term here, besides the unconstrained one below and it's a bit subtle.

Currently, NormalizesTo goals cannot be a root goal so if it's term is an alias type, it is replaced by an inference var when being added as a nested goal in EvalCtxt::add_goal.

But as it becomes the Projection goal and can be evaluated as a root goal in some places such as normalization, it's term can be an alias type, which isn't replaced by an inference var.
That's a bit sad especially when I'm calling eq_structurally_relating_alias after the probe.
It should be normalized or otherwise fail the evaluation, so I'm replacing it with an inference var and the candidate evaluation inside the probe would either normalize it or fail the current query (I feel both ways are correct)

let resp = self.probe(|_| ProbeKind::ShadowedEnvProbing).enter(|ecx| {
ecx.var_values.var_values = extended_var_values;
ecx.var_kinds = extended_var_kinds;
ecx.current_goal_kind = CurrentGoalKind::NormalizesTo;
Copy link
Copy Markdown
Member Author

@ShoyuVanilla ShoyuVanilla Mar 19, 2026

Choose a reason for hiding this comment

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

48e119ef#diff-3cb8110806ddb0ad4c49129dde2f9656727f8baf1f9f7456bfe6d008c5222009

Exactly the same purpose on candidate selection 😄

goal: Goal<I, ty::ProjectionPredicate<I>>,
term: I::Term,
) {
) -> Result<(), NoSolution> {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The above premise on the function's comment is not true anymore, so Result instead of ICE

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.

this should still hold inside of the nested candidate assemble instantiate 🤔 would expect that we use normal eq outside of it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Okay, I'll revert this and check whether it triggers ICE

goal: Goal<I, ty::ProjectionPredicate<I>>,
term: ty::AliasTerm<I>,
) {
) -> Result<(), NoSolution> {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Same here

extended_var_kinds.push(extra_var_kind);
let extended_var_kinds = cx.mk_canonical_var_kinds(&extended_var_kinds);

let resp = self.probe(|_| ProbeKind::ShadowedEnvProbing).enter(|ecx| {
Copy link
Copy Markdown
Member Author

@ShoyuVanilla ShoyuVanilla Mar 19, 2026

Choose a reason for hiding this comment

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

The probe kind and the following EvalCtxt's field visivility changes are temporary PoCs 😅

@ShoyuVanilla
Copy link
Copy Markdown
Member Author

ShoyuVanilla commented Mar 19, 2026

r? lcnr

The overall implementation is a coarse PoC so far, and I'd like check whether I'm understanding your initial design correctly 😄

I somehow ended up with 36 failures on tests/ui with 0 compilation failed although it shouldn't thing. 35 of them are diagnostics diffs and the other one is an ICE on the fulfillment error, as I haven't dealt with the NormalizesTo -> Projection there yet

@ShoyuVanilla ShoyuVanilla force-pushed the goodbye-normalizes-to branch from 83d432a to cfbd86e Compare March 19, 2026 19:25
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job 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)
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
PR_CI_JOB set; skipping tidy
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-03-05/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---
---- [ui] tests/ui/associated-types/defaults-unsound-62211-1.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/associated-types/defaults-unsound-62211-1.next/defaults-unsound-62211-1.next.stderr`
diff of stderr:

30 LL | trait UncheckedCopy: Sized + AddAssign<&'static str> {
31    |                            +++++++++++++++++++++++++
32 
- error[E0277]: the trait bound `Self: Deref` is not satisfied
+ error[E0271]: type mismatch resolving `<Self as Deref>::Target == str`
34   --> $DIR/defaults-unsound-62211-1.rs:24:96
35    |
36 LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;

-    |                                                                                                ^^^^ the trait `Deref` is not implemented for `Self`
+    |                                                                                                ^^^^ types differ
38    |
39 note: required by a bound in `UncheckedCopy::Output`
40   --> $DIR/defaults-unsound-62211-1.rs:24:31

41    |
42 LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
43    |                               ^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
+ 
+ error[E0277]: the trait bound `Self: Deref` is not satisfied
+   --> $DIR/defaults-unsound-62211-1.rs:24:96
+    |
+ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
+    |                                                                                                ^^^^ the trait `Deref` is not implemented for `Self`
+    |
+ note: required by a bound in `UncheckedCopy::Output`
+   --> $DIR/defaults-unsound-62211-1.rs:24:25
+    |
+ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
+    |                         ^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
44 help: consider further restricting `Self`
45    |
46 LL | trait UncheckedCopy: Sized + Deref {

62 LL | trait UncheckedCopy: Sized + Copy {
---
-   --> /checkout/tests/ui/associated-types/defaults-unsound-62211-1.rs:24:25
+ error[E0271]: type mismatch resolving `<Self as Deref>::Target == str`
+   --> $DIR/defaults-unsound-62211-1.rs:24:96
+    |
+ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
+    |                                                                                                ^^^^ types differ
+    |
+ note: required by a bound in `UncheckedCopy::Output`
+   --> $DIR/defaults-unsound-62211-1.rs:24:31
+    |
+ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
+    |                               ^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
+ 
+   --> $DIR/defaults-unsound-62211-1.rs:24:25
+    |                         ^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
+ error: aborting due to 5 previous errors
+ Some errors have detailed explanations: E0271, E0277.
---
To only update this specific test, also pass `--test-args associated-types/defaults-unsound-62211-1.rs`

error in revision `next`: 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/associated-types/defaults-unsound-62211-1.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/associated-types/defaults-unsound-62211-1.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0277]: `Self` doesn't implement `std::fmt::Display`
##[error]  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-1.rs:24:96
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                                                                                ^^^^ the trait `std::fmt::Display` is not implemented for `Self`
   |
note: required by a bound in `UncheckedCopy::Output`
  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-1.rs:24:86
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                                                                      ^^^^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
   |
LL | trait UncheckedCopy: Sized + std::fmt::Display {
   |                            +++++++++++++++++++

error[E0277]: cannot add-assign `&'static str` to `Self`
##[error]  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-1.rs:24:96
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                                                                                ^^^^ no implementation for `Self += &'static str`
   |
note: required by a bound in `UncheckedCopy::Output`
  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-1.rs:24:47
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                               ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
   |
LL | trait UncheckedCopy: Sized + AddAssign<&'static str> {
   |                            +++++++++++++++++++++++++

error[E0271]: type mismatch resolving `<Self as Deref>::Target == str`
##[error]  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-1.rs:24:96
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                                                                                ^^^^ types differ
   |
note: required by a bound in `UncheckedCopy::Output`
  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-1.rs:24:31
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                               ^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`

error[E0277]: the trait bound `Self: Deref` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-1.rs:24:96
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                                                                                ^^^^ the trait `Deref` is not implemented for `Self`
   |
note: required by a bound in `UncheckedCopy::Output`
  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-1.rs:24:25
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                         ^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
   |
LL | trait UncheckedCopy: Sized + Deref {
   |                            +++++++

error[E0277]: the trait bound `Self: Copy` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-1.rs:24:96
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                                                                                ^^^^ the trait `Copy` is not implemented for `Self`
   |
note: required by a bound in `UncheckedCopy::Output`
  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-1.rs:24:18
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                  ^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
   |
LL | trait UncheckedCopy: Sized + Copy {
   |                            ++++++

---
---- [ui] tests/ui/associated-types/defaults-unsound-62211-2.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/associated-types/defaults-unsound-62211-2.next/defaults-unsound-62211-2.next.stderr`
diff of stderr:

30 LL | trait UncheckedCopy: Sized + AddAssign<&'static str> {
31    |                            +++++++++++++++++++++++++
32 
- error[E0277]: the trait bound `Self: Deref` is not satisfied
+ error[E0271]: type mismatch resolving `<Self as Deref>::Target == str`
34   --> $DIR/defaults-unsound-62211-2.rs:24:96
35    |
36 LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;

-    |                                                                                                ^^^^ the trait `Deref` is not implemented for `Self`
+    |                                                                                                ^^^^ types differ
38    |
39 note: required by a bound in `UncheckedCopy::Output`
40   --> $DIR/defaults-unsound-62211-2.rs:24:31

41    |
42 LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
43    |                               ^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
+ 
+ error[E0277]: the trait bound `Self: Deref` is not satisfied
+   --> $DIR/defaults-unsound-62211-2.rs:24:96
+    |
+ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
+    |                                                                                                ^^^^ the trait `Deref` is not implemented for `Self`
+    |
+ note: required by a bound in `UncheckedCopy::Output`
+   --> $DIR/defaults-unsound-62211-2.rs:24:25
+    |
+ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
+    |                         ^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
44 help: consider further restricting `Self`
45    |
46 LL | trait UncheckedCopy: Sized + Deref {

62 LL | trait UncheckedCopy: Sized + Copy {
---
-   --> /checkout/tests/ui/associated-types/defaults-unsound-62211-2.rs:24:25
+ error[E0271]: type mismatch resolving `<Self as Deref>::Target == str`
+   --> $DIR/defaults-unsound-62211-2.rs:24:96
+    |
+ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
+    |                                                                                                ^^^^ types differ
+    |
+ note: required by a bound in `UncheckedCopy::Output`
+   --> $DIR/defaults-unsound-62211-2.rs:24:31
+    |
+ LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
+    |                               ^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
+ 
+   --> $DIR/defaults-unsound-62211-2.rs:24:25
+    |                         ^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
+ error: aborting due to 5 previous errors
+ Some errors have detailed explanations: E0271, E0277.
---
To only update this specific test, also pass `--test-args associated-types/defaults-unsound-62211-2.rs`

error in revision `next`: 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/associated-types/defaults-unsound-62211-2.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/associated-types/defaults-unsound-62211-2.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0277]: `Self` doesn't implement `std::fmt::Display`
##[error]  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-2.rs:24:96
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                                                                                ^^^^ the trait `std::fmt::Display` is not implemented for `Self`
   |
note: required by a bound in `UncheckedCopy::Output`
  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-2.rs:24:86
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                                                                      ^^^^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
   |
LL | trait UncheckedCopy: Sized + std::fmt::Display {
   |                            +++++++++++++++++++

error[E0277]: cannot add-assign `&'static str` to `Self`
##[error]  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-2.rs:24:96
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                                                                                ^^^^ no implementation for `Self += &'static str`
   |
note: required by a bound in `UncheckedCopy::Output`
  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-2.rs:24:47
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                               ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
   |
LL | trait UncheckedCopy: Sized + AddAssign<&'static str> {
   |                            +++++++++++++++++++++++++

error[E0271]: type mismatch resolving `<Self as Deref>::Target == str`
##[error]  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-2.rs:24:96
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                                                                                ^^^^ types differ
   |
note: required by a bound in `UncheckedCopy::Output`
  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-2.rs:24:31
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                               ^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`

error[E0277]: the trait bound `Self: Deref` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-2.rs:24:96
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                                                                                ^^^^ the trait `Deref` is not implemented for `Self`
   |
note: required by a bound in `UncheckedCopy::Output`
  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-2.rs:24:25
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                         ^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
   |
LL | trait UncheckedCopy: Sized + Deref {
   |                            +++++++

error[E0277]: the trait bound `Self: Copy` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-2.rs:24:96
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                                                                                                ^^^^ the trait `Copy` is not implemented for `Self`
   |
note: required by a bound in `UncheckedCopy::Output`
  --> /checkout/tests/ui/associated-types/defaults-unsound-62211-2.rs:24:18
   |
LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
   |                  ^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
   |
LL | trait UncheckedCopy: Sized + Copy {
   |                            ++++++

---
---- [ui] tests/ui/associated-types/issue-54108.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/associated-types/issue-54108.next/issue-54108.next.stderr`
diff of stderr:

+ error[E0271]: type mismatch resolving `<<T as SubEncoder>::ActualSize as Add>::Output == <T as SubEncoder>::ActualSize`
+   --> $DIR/issue-54108.rs:23:17
+    |
+ LL |     type Size = <Self as SubEncoder>::ActualSize;
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+    |
+ note: required by a bound in `Encoder::Size`
+   --> $DIR/issue-54108.rs:8:20
+    |
+ LL |     type Size: Add<Output = Self::Size>;
+    |                    ^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
+ 
1 error[E0277]: cannot add `<T as SubEncoder>::ActualSize` to `<T as SubEncoder>::ActualSize`
2   --> $DIR/issue-54108.rs:23:17
3    |

6    |
7    = help: the trait `Add` is not implemented for `<T as SubEncoder>::ActualSize`
8 note: required by a bound in `Encoder::Size`
-   --> $DIR/issue-54108.rs:8:20
+   --> $DIR/issue-54108.rs:8:16
10    |
11 LL |     type Size: Add<Output = Self::Size>;
-    |                    ^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
+    |                ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
13 help: consider further restricting the associated type
14    |
15 LL |     T: SubEncoder, <T as SubEncoder>::ActualSize: Add

16    |                    ++++++++++++++++++++++++++++++++++
17 
- error: aborting due to 1 previous error
+ error: aborting due to 2 previous errors
---
Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/associated-types/issue-54108.rs:23:17
-   --> /checkout/tests/ui/associated-types/issue-54108.rs:8:20
-   --> /checkout/tests/ui/associated-types/issue-54108.rs:8:16
+ error[E0271]: type mismatch resolving `<<T as SubEncoder>::ActualSize as Add>::Output == <T as SubEncoder>::ActualSize`
+   --> $DIR/issue-54108.rs:23:17
+    |
+ LL |     type Size = <Self as SubEncoder>::ActualSize;
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+    |
+ note: required by a bound in `Encoder::Size`
+   --> $DIR/issue-54108.rs:8:20
+    |
+ LL |     type Size: Add<Output = Self::Size>;
+    |                    ^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
+ 
+   --> $DIR/issue-54108.rs:8:16
+    |                ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
+ error: aborting due to 2 previous errors
---
To only update this specific test, also pass `--test-args associated-types/issue-54108.rs`

error in revision `next`: 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/associated-types/issue-54108.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/associated-types/issue-54108.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<<T as SubEncoder>::ActualSize as Add>::Output == <T as SubEncoder>::ActualSize`
##[error]  --> /checkout/tests/ui/associated-types/issue-54108.rs:23:17
   |
LL |     type Size = <Self as SubEncoder>::ActualSize;
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
   |
note: required by a bound in `Encoder::Size`
  --> /checkout/tests/ui/associated-types/issue-54108.rs:8:20
   |
LL |     type Size: Add<Output = Self::Size>;
   |                    ^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`

error[E0277]: cannot add `<T as SubEncoder>::ActualSize` to `<T as SubEncoder>::ActualSize`
##[error]  --> /checkout/tests/ui/associated-types/issue-54108.rs:23:17
   |
LL |     type Size = <Self as SubEncoder>::ActualSize;
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `<T as SubEncoder>::ActualSize + <T as SubEncoder>::ActualSize`
   |
   = help: the trait `Add` is not implemented for `<T as SubEncoder>::ActualSize`
note: required by a bound in `Encoder::Size`
  --> /checkout/tests/ui/associated-types/issue-54108.rs:8:16
   |
LL |     type Size: Add<Output = Self::Size>;
   |                ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
help: consider further restricting the associated type
   |
LL |     T: SubEncoder, <T as SubEncoder>::ActualSize: Add
   |                    ++++++++++++++++++++++++++++++++++

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0271, E0277.
For more information about an error, try `rustc --explain E0271`.
------------------------------------------

---- [ui] tests/ui/associated-types/issue-54108.rs#next stdout end ----
---- [ui] tests/ui/async-await/async-closures/is-not-fn.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/async-await/async-closures/is-not-fn.next/is-not-fn.next.stderr`
diff of stderr:

- error[E0271]: type mismatch resolving `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25} == ()`
+ error[E0271]: type mismatch resolving `<{async closure@is-not-fn.rs:8:14} as FnOnce<()>>::Output == ()`
2   --> $DIR/is-not-fn.rs:8:14
3    |
4 LL |     needs_fn(async || {});


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 async-await/async-closures/is-not-fn.rs`

error in revision `next`: 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/async-await/async-closures/is-not-fn.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/async-await/async-closures/is-not-fn.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2021" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<{async closure@is-not-fn.rs:8:14} as FnOnce<()>>::Output == ()`
##[error]  --> /checkout/tests/ui/async-await/async-closures/is-not-fn.rs:8:14
   |
LL |     needs_fn(async || {});
   |     -------- ^^^^^^^^^^^ types differ
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `needs_fn`
  --> /checkout/tests/ui/async-await/async-closures/is-not-fn.rs:7:25
   |
LL |     fn needs_fn(x: impl FnOnce()) {}
   |                         ^^^^^^^^ required by this bound in `needs_fn`

error: aborting due to 1 previous error

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

---- [ui] tests/ui/async-await/async-closures/is-not-fn.rs#next stdout end ----
---- [ui] tests/ui/auto-traits/assoc-ty.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/auto-traits/assoc-ty.next/assoc-ty.next.stderr`
diff of stderr:

22    = help: add `#![feature(auto_traits)]` to the crate attributes to enable
23    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
24 
- error[E0271]: type mismatch resolving `<() as Trait>::Output normalizes-to _`
+ error[E0271]: type mismatch resolving `<() as Trait>::Output == _`
26   --> $DIR/assoc-ty.rs:17:12
27    |
28 LL |     let _: <() as Trait>::Output = ();

29    |            ^^^^^^^^^^^^^^^^^^^^^ types differ
30 
- error[E0271]: type mismatch resolving `<() as Trait>::Output normalizes-to _`
-   --> $DIR/assoc-ty.rs:17:12
-    |
- LL |     let _: <() as Trait>::Output = ();
-    |            ^^^^^^^^^^^^^^^^^^^^^ types differ
-    |
-    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
- 
- error: aborting due to 4 previous errors
+ error: aborting due to 3 previous errors
40 
41 Some errors have detailed explanations: E0271, E0380, E0658.
---
To only update this specific test, also pass `--test-args auto-traits/assoc-ty.rs`

error in revision `next`: 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/auto-traits/assoc-ty.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/auto-traits/assoc-ty.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0380]: auto traits cannot have associated items
##[error]  --> /checkout/tests/ui/auto-traits/assoc-ty.rs:11:10
   |
---
##[error]  --> /checkout/tests/ui/auto-traits/assoc-ty.rs:8:1
   |
LL | / auto trait Trait {
LL | |     //~^ ERROR auto traits are experimental and possibly buggy
LL | |     //~| HELP add `#![feature(auto_traits)]` to the crate attributes to enable
LL | |     type Output;
...  |
LL | | }
   | |_^
   |
   = note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information
   = help: add `#![feature(auto_traits)]` 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[E0271]: type mismatch resolving `<() as Trait>::Output == _`
##[error]  --> /checkout/tests/ui/auto-traits/assoc-ty.rs:17:12
   |
LL |     let _: <() as Trait>::Output = ();
   |            ^^^^^^^^^^^^^^^^^^^^^ types differ

---
------------------------------------------

---- [ui] tests/ui/auto-traits/assoc-ty.rs#next stdout end ----
---- [ui] tests/ui/coherence/indirect-impl-for-trait-obj-coherence.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/coherence/indirect-impl-for-trait-obj-coherence.next/indirect-impl-for-trait-obj-coherence.next.stderr`
diff of stderr:

- error[E0284]: type annotations needed: cannot normalize `<dyn Object<U, Output = T> as Object<U>>::Output`
+ error[E0284]: type annotations needed: cannot satisfy `<dyn Object<U, Output = T> as Object<U>>::Output == T`
2   --> $DIR/indirect-impl-for-trait-obj-coherence.rs:25:41
3    |
4 LL |     foo::<dyn Object<U, Output = T>, U>(x)

-    |                                         ^ cannot normalize `<dyn Object<U, Output = T> as Object<U>>::Output`
+    |                                         ^ cannot satisfy `<dyn Object<U, Output = T> as Object<U>>::Output == T`
6 
7 error: aborting due to 1 previous error
8 


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 coherence/indirect-impl-for-trait-obj-coherence.rs`

error in revision `next`: 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/coherence/indirect-impl-for-trait-obj-coherence.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/coherence/indirect-impl-for-trait-obj-coherence.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0284]: type annotations needed: cannot satisfy `<dyn Object<U, Output = T> as Object<U>>::Output == T`
##[error]  --> /checkout/tests/ui/coherence/indirect-impl-for-trait-obj-coherence.rs:25:41
   |
LL |     foo::<dyn Object<U, Output = T>, U>(x)
   |                                         ^ cannot satisfy `<dyn Object<U, Output = T> as Object<U>>::Output == T`

error: aborting due to 1 previous error

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

14    |
15    = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
16 
- error[E0284]: type annotations needed: cannot normalize `<for<'a> fn(&'a (), ()) as Overlap<for<'a> fn(&'a (), ())>>::Assoc`
-   --> $DIR/associated-type.rs:45:59
-    |
- LL |     foo::<for<'a> fn(&'a (), ()), for<'a> fn(&'a (), ())>(3usize);
-    |                                                           ^^^^^^ cannot normalize `<for<'a> fn(&'a (), ()) as Overlap<for<'a> fn(&'a (), ())>>::Assoc`
+ error: aborting due to 1 previous error
22 
- error: aborting due to 2 previous errors
- 
- Some errors have detailed explanations: E0119, E0284.
---
To only update this specific test, also pass `--test-args coherence/occurs-check/associated-type.rs`

error in revision `next`: 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/coherence/occurs-check/associated-type.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,old,next)" "--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/coherence/occurs-check/associated-type.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
 WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1))], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit), .. }
 WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1))], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit), .. }
error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), ())>` for type `for<'a> fn(&'a (), ())`
##[error]  --> /checkout/tests/ui/coherence/occurs-check/associated-type.rs:32:1
   |
LL |   impl<T> Overlap<T> for T {
   |   ------------------------ first implementation here
...
LL | / impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T
LL | | //~^ ERROR conflicting implementations of trait
LL | | where
LL | |     for<'a> *const T: ToUnit<'a>,
   | |_________________________________^ conflicting implementation for `for<'a> fn(&'a (), ())`
   |
   = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details

error: aborting due to 1 previous error

---
16    |              ^^^^^^^^^^ required by this bound in `Trait`
17 
- error[E0277]: the trait bound `(): SuperTrait` is not satisfied
-   --> $DIR/type-const-ice-issue-151631.rs:17:5
+ error[E0271]: type mismatch resolving `<() as Trait>::K == 0`
+   --> $DIR/type-const-ice-issue-151631.rs:17:11
20    |
21 LL |     check(());
-    |     ^^^^^^^^^ the trait `SuperTrait` is not implemented for `()`
+    |     ----- ^^ types differ
---
-   --> $DIR/type-const-ice-issue-151631.rs:7:14
-    |
- LL | trait Trait: SuperTrait {
-    |              ^^^^^^^^^^ required by this bound in `Trait`
+ LL | fn check(_: impl Trait<K = 0>) {}
+    |                        ^^^^^ required by this bound in `check`
34 
35 error: aborting due to 2 previous errors
36 

---

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/const-generics/type-const-ice-issue-151631.rs:17:11
-   --> /checkout/tests/ui/const-generics/type-const-ice-issue-151631.rs:14:24
+ error[E0271]: type mismatch resolving `<() as Trait>::K == 0`
+   --> $DIR/type-const-ice-issue-151631.rs:17:11
+    |     ----- ^^ types differ
+    |     |
+    |     required by a bound introduced by this call
+ note: required by a bound in `check`
+   --> $DIR/type-const-ice-issue-151631.rs:14:24
+ LL | fn check(_: impl Trait<K = 0>) {}
+    |                        ^^^^^ required by this bound in `check`
+ Some errors have detailed explanations: E0271, E0277.
+ For more information about an error, try `rustc --explain E0271`.


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 const-generics/type-const-ice-issue-151631.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/const-generics/type-const-ice-issue-151631.rs" "-Zthreads=1" "-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/const-generics/type-const-ice-issue-151631" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `(): SuperTrait` is not satisfied
##[error]  --> /checkout/tests/ui/const-generics/type-const-ice-issue-151631.rs:10:16
   |
LL | impl Trait for () { //~ ERROR: the trait bound `(): SuperTrait` is not satisfied
   |                ^^ the trait `SuperTrait` is not implemented for `()`
   |
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/const-generics/type-const-ice-issue-151631.rs:6:1
   |
LL | trait SuperTrait {}
   | ^^^^^^^^^^^^^^^^
note: required by a bound in `Trait`
  --> /checkout/tests/ui/const-generics/type-const-ice-issue-151631.rs:7:14
   |
LL | trait Trait: SuperTrait {
   |              ^^^^^^^^^^ required by this bound in `Trait`

error[E0271]: type mismatch resolving `<() as Trait>::K == 0`
##[error]  --> /checkout/tests/ui/const-generics/type-const-ice-issue-151631.rs:17:11
   |
LL |     check(()); //~ ERROR: the trait bound `(): SuperTrait` is not satisfied
   |     ----- ^^ types differ
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `check`
  --> /checkout/tests/ui/const-generics/type-const-ice-issue-151631.rs:14:24
   |
LL | fn check(_: impl Trait<K = 0>) {}
   |                        ^^^^^ required by this bound in `check`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0271, E0277.
---

22 LL |         T: AsExpression<Self::SqlType>,
23    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Foo::check`
24 
- error[E0277]: the trait bound `&str: AsExpression<Integer>` is not satisfied
+ error[E0271]: type mismatch resolving `<&str as AsExpression<Integer>>::Expression == _`
26   --> $DIR/as_expression.rs:56:5
27    |
28 LL |     SelectInt.check("bar");

-    |     ^^^^^^^^^^^^^^^^^^^^^^ the trait `AsExpression<Integer>` is not implemented for `&str`
-    |
- help: the trait `AsExpression<Integer>` is not implemented for `&str`
-       but trait `AsExpression<Text>` is implemented for it
-   --> $DIR/as_expression.rs:40:1
-    |
- LL | impl AsExpression<Text> for &'_ str {
-    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    = help: for that trait implementation, expected `Text`, found `Integer`
+    |     ^^^^^^^^^^^^^^^^^^^^^^ types differ
38 
39 error: aborting due to 2 previous errors
---
To only update this specific test, also pass `--test-args diagnostic_namespace/do_not_recommend/as_expression.rs`

error in revision `next`: 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/diagnostic_namespace/do_not_recommend/as_expression.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/diagnostic_namespace/do_not_recommend/as_expression.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `&str: AsExpression<Integer>` is not satisfied
##[error]  --> /checkout/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.rs:56:21
   |
LL |     SelectInt.check("bar");
   |               ----- ^^^^^ the trait `AsExpression<Integer>` is not implemented for `&str`
   |               |
   |               required by a bound introduced by this call
   |
help: the trait `AsExpression<Integer>` is not implemented for `&str`
      but trait `AsExpression<Text>` is implemented for it
  --> /checkout/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.rs:40:1
   |
LL | impl AsExpression<Text> for &'_ str {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: for that trait implementation, expected `Text`, found `Integer`
note: required by a bound in `Foo::check`
  --> /checkout/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.rs:47:12
   |
LL |     fn check<T>(&self, _: T) -> <T as AsExpression<<Self as Expression>::SqlType>>::Expression
   |        ----- required by a bound in this associated function
LL |     where
LL |         T: AsExpression<Self::SqlType>,
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Foo::check`

error[E0271]: type mismatch resolving `<&str as AsExpression<Integer>>::Expression == _`
##[error]  --> /checkout/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.rs:56:5
   |
LL |     SelectInt.check("bar");
   |     ^^^^^^^^^^^^^^^^^^^^^^ types differ

---
------------------------------------------

---- [ui] tests/ui/diagnostic_namespace/do_not_recommend/as_expression.rs#next stdout end ----
---- [ui] tests/ui/higher-ranked/leak-check/candidate-from-env-universe-err-project.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/higher-ranked/leak-check/candidate-from-env-universe-err-project.next/candidate-from-env-universe-err-project.next.stderr`
diff of stderr:

- error[E0271]: type mismatch resolving `<T as Trait<'a>>::Assoc == usize`
-   --> $DIR/candidate-from-env-universe-err-project.rs:38:24
-    |
- LL |     projection_bound::<T>();
-    |                        ^ types differ
-    |
- note: required by a bound in `projection_bound`
-   --> $DIR/candidate-from-env-universe-err-project.rs:19:42
-    |
- LL | fn projection_bound<T: for<'a> Trait<'a, Assoc = usize>>() {}
-    |                                          ^^^^^^^^^^^^^ required by this bound in `projection_bound`
- 
13 error: higher-ranked subtype error
14   --> $DIR/candidate-from-env-universe-err-project.rs:52:30
15    |

24    |
25    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
26 
- error: aborting due to 3 previous errors
+ error: aborting due to 2 previous errors
28 
- For more information about this error, try `rustc --explain E0271`.
---
To only update this specific test, also pass `--test-args higher-ranked/leak-check/candidate-from-env-universe-err-project.rs`

error in revision `next`: 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/higher-ranked/leak-check/candidate-from-env-universe-err-project.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,next,current)" "--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/higher-ranked/leak-check/candidate-from-env-universe-err-project.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error: higher-ranked subtype error
##[error]  --> /checkout/tests/ui/higher-ranked/leak-check/candidate-from-env-universe-err-project.rs:52:30
   |
LL |     let _higher_ranked_norm: for<'a> fn(<T as Trait<'a>>::Assoc) = |_| ();
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: higher-ranked subtype error
##[error]  --> /checkout/tests/ui/higher-ranked/leak-check/candidate-from-env-universe-err-project.rs:52:30
   |
LL |     let _higher_ranked_norm: for<'a> fn(<T as Trait<'a>>::Assoc) = |_| ();
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

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

---- [ui] tests/ui/higher-ranked/leak-check/candidate-from-env-universe-err-project.rs#next stdout end ----
---- [ui] tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.next/rigid-equate-projections-in-higher-ranked-fn-signature.next.stderr`
diff of stderr:

- error[E0284]: type annotations needed: cannot satisfy `for<'a> <_ as Trait<'a>>::Assoc normalizes-to <T as Trait<'_>>::Assoc`
+ error[E0284]: type annotations needed
2   --> $DIR/rigid-equate-projections-in-higher-ranked-fn-signature.rs:27:50
3    |
4 LL |     let _: for<'a> fn(<_ as Trait<'a>>::Assoc) = foo::<T>();

-    |                                                  ^^^^^^^^^^ cannot satisfy `for<'a> <_ as Trait<'a>>::Assoc normalizes-to <T as Trait<'_>>::Assoc`
+    |                                                  ^^^^^^^^^^ cannot infer type
+    |
+    = note: cannot satisfy `for<'a> <_ as Trait<'a>>::Assoc == <T as Trait<'_>>::Assoc`
6 
7 error: aborting due to 1 previous error
8 


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 higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.rs`

error in revision `next`: 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/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0284]: type annotations needed
##[error]  --> /checkout/tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.rs:27:50
   |
LL |     let _: for<'a> fn(<_ as Trait<'a>>::Assoc) = foo::<T>(); //[next]~ ERROR type annotations needed
   |                                                  ^^^^^^^^^^ cannot infer type
   |
   = note: cannot satisfy `for<'a> <_ as Trait<'a>>::Assoc == <T as Trait<'_>>::Assoc`

error: aborting due to 1 previous error

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

---- [ui] tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.rs#next stdout end ----
---- [ui] tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.next/ice-unexpected-param-type-whensubstituting-in-region-112823.next.stderr`
diff of stderr:

25    |
26    = note: `LineStream` must be used in combination with a concrete type within the same impl
27 
- error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to ()`
+ error[E0277]: `()` is not a future
29   --> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:29:43
30    |
31 LL |     fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}

-    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
- 
- error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
-   --> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:29:73
+    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not a future
36    |
- LL |     fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
-    |                                                                         ^^ types differ
+    = help: the trait `Future` is not implemented for `()`
39 
- error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
+ error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> == _`
41   --> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:29:5
42    |
43 LL |     fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}

-    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> == _`
+    |
+ note: types differ
+   --> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:36
+    |
+ LL |     type LineStreamFut<'a, Repr> = impl Future<Output = Self::LineStream<'a, Repr>>;
+    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 
- error: aborting due to 6 previous errors
+ error: aborting due to 5 previous errors
47 
- Some errors have detailed explanations: E0049, E0271, E0407.
+ Some errors have detailed explanations: E0049, E0271, E0277, E0407.
49 For more information about an error, try `rustc --explain E0049`.
50 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:36
+ error[E0277]: `()` is not a future
+    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not a future
+    = help: the trait `Future` is not implemented for `()`
+ error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> == _`
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> == _`
+    |
+ note: types differ
+   --> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:36
+    |
+ LL |     type LineStreamFut<'a, Repr> = impl Future<Output = Self::LineStream<'a, Repr>>;
+    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ error: aborting due to 5 previous errors
+ Some errors have detailed explanations: E0049, E0271, E0277, E0407.


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 impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs`

error in revision `next`: 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/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0407]: method `line_stream` is not a member of trait `X`
##[error]  --> /checkout/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:29:5
   |
LL |     fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `X`

error[E0049]: associated type `LineStream` has 0 type parameters but its trait declaration has 1 type parameter
##[error]  --> /checkout/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:25:21
   |
LL |     type LineStream<'a, Repr>
   |                     --  ----
   |                     |
   |                     expected 1 type parameter
...
LL |     type LineStream<'c, 'd> = impl Stream;
   |                     ^^  ^^
   |                     |
   |                     found 0 type parameters

error: unconstrained opaque type
##[error]  --> /checkout/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:25:31
   |
LL |     type LineStream<'c, 'd> = impl Stream;
   |                               ^^^^^^^^^^^
   |
   = note: `LineStream` must be used in combination with a concrete type within the same impl

error[E0277]: `()` is not a future
##[error]  --> /checkout/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:29:43
   |
LL |     fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not a future
   |
   = help: the trait `Future` is not implemented for `()`

error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> == _`
##[error]  --> /checkout/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:29:5
   |
LL |     fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> == _`
   |
note: types differ
  --> /checkout/tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:36
   |
LL |     type LineStreamFut<'a, Repr> = impl Future<Output = Self::LineStream<'a, Repr>>;
   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0049, E0271, E0277, E0407.
---
---- [ui] tests/ui/issues/issue-33941.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/issues/issue-33941.next/issue-33941.next.stderr`
diff of stderr:

- error[E0271]: expected `Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
+ error[E0271]: type mismatch resolving `<Iter<'_, _, _> as Iterator>::Item == &_`
2   --> $DIR/issue-33941.rs:9:36
3    |
4 LL |     for _ in HashMap::new().iter().cloned() {}

-    |                                    ^^^^^^ expected `&_`, found `(&_, &_)`
+    |                                    ^^^^^^ types differ
6    |
-    = note: expected reference `&_`
-                   found tuple `(&_, &_)`
+ note: the method call chain might not have had the expected associated types
+   --> $DIR/issue-33941.rs:9:29
+    |
+ LL |     for _ in HashMap::new().iter().cloned() {}
+    |              -------------- ^^^^^^ `Iterator::Item` is `(&_, &_)` here
+    |              |
+    |              this expression has type `HashMap<_, _>`
9 note: required by a bound in `cloned`
10   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
11 

- error[E0271]: expected `Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)`
+ error[E0271]: type mismatch resolving `<Iter<'_, _, _> as Iterator>::Item == &_`
13   --> $DIR/issue-33941.rs:9:14
14    |
15 LL |     for _ in HashMap::new().iter().cloned() {}

-    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `(&_, &_)`
+    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
17    |
-    = note: expected reference `&_`
-                   found tuple `(&_, &_)`
20    = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `Iterator`
21    = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `IntoIterator`
22 

- error: aborting due to 2 previous errors
+ error[E0271]: type mismatch resolving `<Cloned<Iter<'_, _, _>> as IntoIterator>::IntoIter == _`
+   --> $DIR/issue-33941.rs:9:14
+    |
+ LL |     for _ in HashMap::new().iter().cloned() {}
+    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+ 
---

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/issues/issue-33941.rs:9:29
-   --> /checkout/tests/ui/issues/issue-33941.rs:9:14
+ error[E0271]: type mismatch resolving `<Iter<'_, _, _> as Iterator>::Item == &_`
+    |                                    ^^^^^^ types differ
+ note: the method call chain might not have had the expected associated types
+   --> $DIR/issue-33941.rs:9:29
+    |
+ LL |     for _ in HashMap::new().iter().cloned() {}
+    |              -------------- ^^^^^^ `Iterator::Item` is `(&_, &_)` here
+    |              |
+    |              this expression has type `HashMap<_, _>`
+ error[E0271]: type mismatch resolving `<Iter<'_, _, _> as Iterator>::Item == &_`
+    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+ error[E0271]: type mismatch resolving `<Cloned<Iter<'_, _, _>> as IntoIterator>::IntoIter == _`
+   --> $DIR/issue-33941.rs:9:14
+    |
+ LL |     for _ in HashMap::new().iter().cloned() {}
+    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+ 
---
To only update this specific test, also pass `--test-args issues/issue-33941.rs`

error in revision `next`: 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/issues/issue-33941.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/issues/issue-33941.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver" "-Zdeduplicate-diagnostics=yes"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<Iter<'_, _, _> as Iterator>::Item == &_`
##[error]  --> /checkout/tests/ui/issues/issue-33941.rs:9:36
   |
LL |     for _ in HashMap::new().iter().cloned() {}
   |                                    ^^^^^^ types differ
   |
note: the method call chain might not have had the expected associated types
  --> /checkout/tests/ui/issues/issue-33941.rs:9:29
   |
LL |     for _ in HashMap::new().iter().cloned() {}
   |              -------------- ^^^^^^ `Iterator::Item` is `(&_, &_)` here
   |              |
   |              this expression has type `HashMap<_, _>`
note: required by a bound in `cloned`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:3556:4

error[E0271]: type mismatch resolving `<Iter<'_, _, _> as Iterator>::Item == &_`
##[error]  --> /checkout/tests/ui/issues/issue-33941.rs:9:14
   |
LL |     for _ in HashMap::new().iter().cloned() {}
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
   |
   = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `Iterator`
   = note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `IntoIterator`

error[E0271]: type mismatch resolving `<Cloned<Iter<'_, _, _>> as IntoIterator>::IntoIter == _`
##[error]  --> /checkout/tests/ui/issues/issue-33941.rs:9:14
   |
LL |     for _ in HashMap::new().iter().cloned() {}
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ

error: aborting due to 3 previous errors

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

---- [ui] tests/ui/issues/issue-33941.rs#next stdout end ----
---- [ui] tests/ui/lazy-type-alias/inherent-impls-overflow.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/lazy-type-alias/inherent-impls-overflow.next/inherent-impls-overflow.next.stderr`
diff of stderr:

- error[E0271]: type mismatch resolving `Loop normalizes-to _`
+ error[E0271]: type mismatch resolving `_ == Loop`
2   --> $DIR/inherent-impls-overflow.rs:8:1
---
To only update this specific test, also pass `--test-args lazy-type-alias/inherent-impls-overflow.rs`

error in revision `next`: 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/lazy-type-alias/inherent-impls-overflow.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/lazy-type-alias/inherent-impls-overflow.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `_ == Loop`
##[error]  --> /checkout/tests/ui/lazy-type-alias/inherent-impls-overflow.rs:8:1
   |
---
   |
LL | impl Loop {}
   |      ^^^^ types differ

error[E0275]: overflow evaluating the requirement `Poly1<(T,)> == _`
##[error]  --> /checkout/tests/ui/lazy-type-alias/inherent-impls-overflow.rs:17:1
   |
LL | type Poly0<T> = Poly1<(T,)>;
   | ^^^^^^^^^^^^^
   |
   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`inherent_impls_overflow`)

error: type parameter `T` is only used recursively
##[error]  --> /checkout/tests/ui/lazy-type-alias/inherent-impls-overflow.rs:17:24
   |
LL | type Poly0<T> = Poly1<(T,)>;
   |            -           ^
   |            |
   |            type parameter must be used non-recursively in the definition
   |
   = help: consider removing `T` or referring to it in the body of the type alias
   = note: all type parameters must be used in a non-recursive way in order to constrain their variance

error[E0275]: overflow evaluating the requirement `Poly0<(T,)> == _`
##[error]  --> /checkout/tests/ui/lazy-type-alias/inherent-impls-overflow.rs:21:1
   |
LL | type Poly1<T> = Poly0<(T,)>;
   | ^^^^^^^^^^^^^
   |
   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`inherent_impls_overflow`)

error: type parameter `T` is only used recursively
##[error]  --> /checkout/tests/ui/lazy-type-alias/inherent-impls-overflow.rs:21:24
   |
LL | type Poly1<T> = Poly0<(T,)>;
   |            -           ^
   |            |
   |            type parameter must be used non-recursively in the definition
   |
   = help: consider removing `T` or referring to it in the body of the type alias
   = note: all type parameters must be used in a non-recursive way in order to constrain their variance

error[E0275]: overflow evaluating the requirement `Poly0<()> == _`
##[error]  --> /checkout/tests/ui/lazy-type-alias/inherent-impls-overflow.rs:26:1
   |
LL | impl Poly0<()> {}
   | ^^^^^^^^^^^^^^^^^
   |
   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`inherent_impls_overflow`)

error[E0275]: overflow evaluating the requirement `Poly0<()> == _`
##[error]  --> /checkout/tests/ui/lazy-type-alias/inherent-impls-overflow.rs:26:6
   |
LL | impl Poly0<()> {}
   |      ^^^^^^^^^
   |
   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`inherent_impls_overflow`)

error: aborting due to 9 previous errors
---

12 note: required by a bound in `find`
13   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
14 
+ error[E0271]: type mismatch resolving `<{closure@closure-arg-type-mismatch-issue-45727.rs:6:29} as FnOnce<(&<RangeInclusive<{integer}> as Iterator>::Item,)>>::Output == bool`
+   --> $DIR/closure-arg-type-mismatch-issue-45727.rs:6:29
+    |
+ LL |     let _ = (-10..=10).find(|x: i32| x.signum() == 0);
+    |                        ---- ^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+    |                        |
+    |                        required by a bound introduced by this call
+    |
+ note: required by a bound in `find`
+   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+ 
15 error[E0271]: expected `RangeInclusive<{integer}>` to be an iterator that yields `&&i32`, but it yields `{integer}`
16   --> $DIR/closure-arg-type-mismatch-issue-45727.rs:9:24
17    |

32 note: required by a bound in `find`
33   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
34 
- error: aborting due to 3 previous errors
+ error[E0271]: type mismatch resolving `<{closure@closure-arg-type-mismatch-issue-45727.rs:9:29} as FnOnce<(&<RangeInclusive<{integer}> as Iterator>::Item,)>>::Output == bool`
+   --> $DIR/closure-arg-type-mismatch-issue-45727.rs:9:29
+    |
+ LL |     let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0);
+    |                        ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+    |                        |
+    |                        required by a bound introduced by this call
+    |
+ note: required by a bound in `find`
---
-   --> /checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:6:29
-   --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:2953:4
-   --> /checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:9:29
-   --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:2953:4
+ error[E0271]: type mismatch resolving `<{closure@closure-arg-type-mismatch-issue-45727.rs:6:29} as FnOnce<(&<RangeInclusive<{integer}> as Iterator>::Item,)>>::Output == bool`
+   --> $DIR/closure-arg-type-mismatch-issue-45727.rs:6:29
+    |
+ LL |     let _ = (-10..=10).find(|x: i32| x.signum() == 0);
+    |                        ---- ^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+    |                        |
+    |                        required by a bound introduced by this call
+    |
+ note: required by a bound in `find`
+   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+ 
+ error[E0271]: type mismatch resolving `<{closure@closure-arg-type-mismatch-issue-45727.rs:9:29} as FnOnce<(&<RangeInclusive<{integer}> as Iterator>::Item,)>>::Output == bool`
+   --> $DIR/closure-arg-type-mismatch-issue-45727.rs:9:29
+    |
+ LL |     let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0);
+    |                        ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+    |                        |
+    |                        required by a bound introduced by this call
+    |
+ note: required by a bound in `find`
---
To only update this specific test, also pass `--test-args mismatched_types/closure-arg-type-mismatch-issue-45727.rs`

error in revision `next`: 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/mismatched_types/closure-arg-type-mismatch-issue-45727.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/mismatched_types/closure-arg-type-mismatch-issue-45727.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0277]: expected a `FnMut(&<std::ops::RangeInclusive<{integer}> as Iterator>::Item)` closure, found `{closure@/checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:6:29: 6:37}`
##[error]  --> /checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:6:29
   |
LL |     let _ = (-10..=10).find(|x: i32| x.signum() == 0);
   |                        ---- ^^^^^^^^^^^^^^^^^^^^^^^^ expected an `FnMut(&<std::ops::RangeInclusive<{integer}> as Iterator>::Item)` closure, found `{closure@/checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:6:29: 6:37}`
   |                        |
   |                        required by a bound introduced by this call
   |
   = help: the trait `for<'a> FnMut(&'a <std::ops::RangeInclusive<{integer}> as Iterator>::Item)` is not implemented for closure `{closure@/checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:6:29: 6:37}`
   = note: expected a closure with signature `for<'a> fn(&'a <std::ops::RangeInclusive<{integer}> as Iterator>::Item)`
              found a closure with signature `fn(i32)`
note: required by a bound in `find`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:2953:4

error[E0271]: type mismatch resolving `<{closure@closure-arg-type-mismatch-issue-45727.rs:6:29} as FnOnce<(&<RangeInclusive<{integer}> as Iterator>::Item,)>>::Output == bool`
##[error]  --> /checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:6:29
   |
LL |     let _ = (-10..=10).find(|x: i32| x.signum() == 0);
   |                        ---- ^^^^^^^^^^^^^^^^^^^^^^^^ types differ
   |                        |
   |                        required by a bound introduced by this call
   |
note: required by a bound in `find`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:2953:4

error[E0271]: expected `RangeInclusive<{integer}>` to be an iterator that yields `&&i32`, but it yields `{integer}`
##[error]  --> /checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:9:24
   |
LL |     let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0);
   |                        ^^^^ expected `&&i32`, found integer

error[E0277]: expected a `FnMut(&<std::ops::RangeInclusive<{integer}> as Iterator>::Item)` closure, found `{closure@/checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:9:29: 9:40}`
##[error]  --> /checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:9:29
   |
LL |     let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0);
   |                        ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an `FnMut(&<std::ops::RangeInclusive<{integer}> as Iterator>::Item)` closure, found `{closure@/checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:9:29: 9:40}`
   |                        |
   |                        required by a bound introduced by this call
   |
   = help: the trait `for<'a> FnMut(&'a <std::ops::RangeInclusive<{integer}> as Iterator>::Item)` is not implemented for closure `{closure@/checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:9:29: 9:40}`
   = note: expected a closure with signature `for<'a> fn(&'a <std::ops::RangeInclusive<{integer}> as Iterator>::Item)`
              found a closure with signature `fn(&&&i32)`
note: required by a bound in `find`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:2953:4

error[E0271]: type mismatch resolving `<{closure@closure-arg-type-mismatch-issue-45727.rs:9:29} as FnOnce<(&<RangeInclusive<{integer}> as Iterator>::Item,)>>::Output == bool`
##[error]  --> /checkout/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs:9:29
   |
LL |     let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0);
   |                        ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
   |                        |
   |                        required by a bound introduced by this call
   |
note: required by a bound in `find`
---
---- [ui] tests/ui/mismatched_types/closure-mismatch.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/mismatched_types/closure-mismatch.next/closure-mismatch.next.stderr`
diff of stderr:

- error[E0277]: the trait bound `{closure@$DIR/closure-mismatch.rs:12:9: 12:12}: Foo` is not satisfied
+ error[E0271]: type mismatch resolving `<{closure@closure-mismatch.rs:12:9} as FnOnce<(&(),)>>::Output == ()`
2   --> $DIR/closure-mismatch.rs:12:9
3    |
4 LL |     baz(|_| ());

-    |     --- ^^^^^^ unsatisfied trait bound
+    |     --- ^^^^^^ types differ
6    |     |
7    |     required by a bound introduced by this call
8    |

-    = help: the trait `for<'a> FnOnce(&'a ())` is not implemented for closure `{closure@$DIR/closure-mismatch.rs:12:9: 12:12}`
-    = note: expected a closure with signature `for<'a> fn(&'a ())`
-               found a closure with signature `fn(&())`
- note: this is a known limitation of the trait solver that will be lifted in the future
-   --> $DIR/closure-mismatch.rs:12:9
-    |
- LL |     baz(|_| ());
-    |     ----^^^----
-    |     |   |
-    |     |   the trait solver is unable to infer the generic types that should be inferred from this argument
-    |     add turbofish arguments to this call to specify the types manually, even if it's redundant
20 note: required for `{closure@$DIR/closure-mismatch.rs:12:9: 12:12}` to implement `Foo`
21   --> $DIR/closure-mismatch.rs:7:18
22    |

24    |         -------  ^^^     ^
25    |         |
26    |         unsatisfied trait bound introduced here
+    = note: associated types for the current `impl` cannot be restricted in `where` clauses
27 note: required by a bound in `baz`
28   --> $DIR/closure-mismatch.rs:9:11
29    |

30 LL | fn baz<T: Foo>(_: T) {}
31    |           ^^^ required by this bound in `baz`
32 
- error[E0277]: the trait bound `{closure@$DIR/closure-mismatch.rs:16:9: 16:12}: Foo` is not satisfied
+ error[E0271]: type mismatch resolving `<{closure@closure-mismatch.rs:16:9} as FnOnce<(&(),)>>::Output == ()`
34   --> $DIR/closure-mismatch.rs:16:9
35    |
36 LL |     baz(|x| ());

-    |     --- ^^^^^^ unsatisfied trait bound
+    |     --- ^^^^^^ types differ
38    |     |
39    |     required by a bound introduced by this call
40    |

-    = help: the trait `for<'a> FnOnce(&'a ())` is not implemented for closure `{closure@$DIR/closure-mismatch.rs:16:9: 16:12}`
-    = note: expected a closure with signature `for<'a> fn(&'a ())`
-               found a closure with signature `fn(&())`
- note: this is a known limitation of the trait solver that will be lifted in the future
-   --> $DIR/closure-mismatch.rs:16:9
-    |
- LL |     baz(|x| ());
-    |     ----^^^----
-    |     |   |
-    |     |   the trait solver is unable to infer the generic types that should be inferred from this argument
-    |     add turbofish arguments to this call to specify the types manually, even if it's redundant
52 note: required for `{closure@$DIR/closure-mismatch.rs:16:9: 16:12}` to implement `Foo`
53   --> $DIR/closure-mismatch.rs:7:18
54    |

56    |         -------  ^^^     ^
57    |         |
---
To only update this specific test, also pass `--test-args mismatched_types/closure-mismatch.rs`

error in revision `next`: 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/mismatched_types/closure-mismatch.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/mismatched_types/closure-mismatch.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<{closure@closure-mismatch.rs:12:9} as FnOnce<(&(),)>>::Output == ()`
##[error]  --> /checkout/tests/ui/mismatched_types/closure-mismatch.rs:12:9
   |
LL |     baz(|_| ());
   |     --- ^^^^^^ types differ
   |     |
   |     required by a bound introduced by this call
   |
note: required for `{closure@/checkout/tests/ui/mismatched_types/closure-mismatch.rs:12:9: 12:12}` to implement `Foo`
  --> /checkout/tests/ui/mismatched_types/closure-mismatch.rs:7:18
   |
LL | impl<T: Fn(&())> Foo for T {}
   |         -------  ^^^     ^
   |         |
   |         unsatisfied trait bound introduced here
   = note: associated types for the current `impl` cannot be restricted in `where` clauses
note: required by a bound in `baz`
  --> /checkout/tests/ui/mismatched_types/closure-mismatch.rs:9:11
   |
LL | fn baz<T: Foo>(_: T) {}
   |           ^^^ required by this bound in `baz`

error[E0271]: type mismatch resolving `<{closure@closure-mismatch.rs:16:9} as FnOnce<(&(),)>>::Output == ()`
##[error]  --> /checkout/tests/ui/mismatched_types/closure-mismatch.rs:16:9
   |
LL |     baz(|x| ());
   |     --- ^^^^^^ types differ
   |     |
   |     required by a bound introduced by this call
   |
note: required for `{closure@/checkout/tests/ui/mismatched_types/closure-mismatch.rs:16:9: 16:12}` to implement `Foo`
  --> /checkout/tests/ui/mismatched_types/closure-mismatch.rs:7:18
   |
LL | impl<T: Fn(&())> Foo for T {}
   |         -------  ^^^     ^
   |         |
   |         unsatisfied trait bound introduced here
   = note: associated types for the current `impl` cannot be restricted in `where` clauses
note: required by a bound in `baz`
  --> /checkout/tests/ui/mismatched_types/closure-mismatch.rs:9:11
   |
LL | fn baz<T: Foo>(_: T) {}
   |           ^^^ required by this bound in `baz`

error: aborting due to 2 previous errors

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

---- [ui] tests/ui/mismatched_types/closure-mismatch.rs#next stdout end ----
---- [ui] tests/ui/traits/dyn-iterator-deref-in-for-loop.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/dyn-iterator-deref-in-for-loop.next/dyn-iterator-deref-in-for-loop.next.stderr`
diff of stderr:

11 LL |     for item in &mut *things {
12    |                 ++++
13 
- error: aborting due to 1 previous error
+ error[E0271]: type mismatch resolving `<dyn Iterator<Item = &mut u8> as IntoIterator>::IntoIter == _`
+   --> $DIR/dyn-iterator-deref-in-for-loop.rs:9:17
+    |
+ LL |     for item in *things {
+    |                 ^^^^^^^ types differ
15 
---
17 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/dyn-iterator-deref-in-for-loop.rs:9:17
+ error[E0271]: type mismatch resolving `<dyn Iterator<Item = &mut u8> as IntoIterator>::IntoIter == _`
+   --> $DIR/dyn-iterator-deref-in-for-loop.rs:9:17
+    |
+ LL |     for item in *things {
+    |                 ^^^^^^^ types differ
+ error: aborting due to 2 previous errors
---
To only update this specific test, also pass `--test-args traits/dyn-iterator-deref-in-for-loop.rs`

error in revision `next`: 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/traits/dyn-iterator-deref-in-for-loop.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/traits/dyn-iterator-deref-in-for-loop.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0277]: `dyn Iterator<Item = &'a mut u8>` is not an iterator
##[error]  --> /checkout/tests/ui/traits/dyn-iterator-deref-in-for-loop.rs:9:17
   |
---
   |
LL |     for item in &mut *things {
   |                 ++++

error[E0271]: type mismatch resolving `<dyn Iterator<Item = &mut u8> as IntoIterator>::IntoIter == _`
##[error]  --> /checkout/tests/ui/traits/dyn-iterator-deref-in-for-loop.rs:9:17
   |
LL |     for item in *things {
   |                 ^^^^^^^ types differ

---
---- [ui] tests/ui/traits/next-solver/alias-bound-unsound.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/alias-bound-unsound/alias-bound-unsound.stderr`
diff of stderr:

24 LL |     let _ = identity(<() as Foo>::copy_me(&x));
25    |                      ^^^^^^^^^^^^^^^^^^^^^^^^
26 
- error[E0275]: overflow evaluating the requirement `<() as Foo>::Item == _`
-   --> $DIR/alias-bound-unsound.rs:28:22
-    |
- LL |     let _ = identity(<() as Foo>::copy_me(&x));
-    |                      ^^^^^^^^^^^^^^^^^^^^^^^^
-    |
-    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
- 
35 error[E0275]: overflow evaluating the requirement `&<() as Foo>::Item well-formed`
36   --> $DIR/alias-bound-unsound.rs:28:43
37    |

44 LL |     let _ = identity(<() as Foo>::copy_me(&x));
45    |                      ^^^^^^^^^^^^^^^^^^^^^^^^
46 
- error[E0275]: overflow evaluating the requirement `<() as Foo>::Item == _`
-   --> $DIR/alias-bound-unsound.rs:28:22
-    |
- LL |     let _ = identity(<() as Foo>::copy_me(&x));
-    |                      ^^^^^^^^^^^^^^^^^^^^^^^^
-    |
-    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
- 
- error: aborting due to 7 previous errors
+ error: aborting due to 5 previous errors
56 
57 For more information about this error, try `rustc --explain E0275`.
---
To only update this specific test, also pass `--test-args traits/next-solver/alias-bound-unsound.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/traits/next-solver/alias-bound-unsound.rs" "-Zthreads=1" "-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/traits/next-solver/alias-bound-unsound" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0275]: overflow evaluating the requirement `String: Copy`
##[error]  --> /checkout/tests/ui/traits/next-solver/alias-bound-unsound.rs:22:38
   |
LL |     type Item = String where String: Copy;
   |                                      ^^^^
   |
note: the requirement `String: Copy` appears on the `impl`'s associated type `Item` but not on the corresponding trait's associated type
  --> /checkout/tests/ui/traits/next-solver/alias-bound-unsound.rs:12:10
   |
LL | trait Foo {
   |       --- in this trait
LL |     type Item: Copy
   |          ^^^^ this trait's associated type doesn't have the requirement `String: Copy`

error[E0275]: overflow evaluating the requirement `<() as Foo>::Item == String`
##[error]  --> /checkout/tests/ui/traits/next-solver/alias-bound-unsound.rs:28:43
   |
LL |     let _ = identity(<() as Foo>::copy_me(&x));
   |                                           ^^

error[E0275]: overflow evaluating the requirement `<() as Foo>::Item == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/alias-bound-unsound.rs:28:22
   |
LL |     let _ = identity(<() as Foo>::copy_me(&x));
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0275]: overflow evaluating the requirement `&<() as Foo>::Item well-formed`
##[error]  --> /checkout/tests/ui/traits/next-solver/alias-bound-unsound.rs:28:43
   |
LL |     let _ = identity(<() as Foo>::copy_me(&x));
   |                                           ^^

error[E0275]: overflow evaluating the requirement `<() as Foo>::Item well-formed`
##[error]  --> /checkout/tests/ui/traits/next-solver/alias-bound-unsound.rs:28:22
   |
LL |     let _ = identity(<() as Foo>::copy_me(&x));
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 5 previous errors

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

---- [ui] tests/ui/traits/next-solver/alias-bound-unsound.rs stdout end ----
---- [ui] tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-2.rs#next stdout ----

error in revision `next`: Error: expected failure status (Some(1)) but received status Some(101).
status: exit status: 101
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/traits/next-solver/assembly/ambiguity-due-to-uniquification-2.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/traits/next-solver/assembly/ambiguity-due-to-uniquification-2.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------

thread 'rustc' (187757) panicked at compiler/rustc_middle/src/ty/context/impl_interner.rs:239:9:
assertion `left matches right` failed
  left: OpaqueTy
 right: DefKind::AssocTy | DefKind::AssocConst { .. }
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_matches_failed::<rustc_hir::def::DefKind>
   4: <rustc_middle::ty::context::TyCtxt as rustc_type_ir::interner::Interner>::trait_ref_and_own_args_for_alias
   5: <rustc_infer::infer::InferCtxt>::probe::<rustc_span::ErrorGuaranteed, <rustc_trait_selection::error_reporting::TypeErrCtxt>::report_projection_error::{closure#0}>
   6: <rustc_trait_selection::error_reporting::TypeErrCtxt>::report_fulfillment_error
   7: <rustc_trait_selection::error_reporting::TypeErrCtxt>::report_fulfillment_errors
   8: rustc_hir_analysis::check::check::check_potentially_region_dependent_goals
      [... omitted 2 frames ...]
   9: <rustc_infer::infer::InferCtxt>::commit_if_ok::<(), rustc_span::ErrorGuaranteed, rustc_trait_selection::traits::query::type_op::custom::scrape_region_constraints<rustc_middle::ty::ParamEnvAnd<rustc_middle::traits::query::type_op::AscribeUserType>, (), <rustc_middle::ty::ParamEnvAnd<rustc_middle::traits::query::type_op::AscribeUserType> as rustc_trait_selection::traits::query::type_op::TypeOp>::fully_perform::{closure#0}>::{closure#0}>
  10: rustc_trait_selection::traits::query::type_op::custom::scrape_region_constraints::<rustc_middle::ty::ParamEnvAnd<rustc_middle::traits::query::type_op::AscribeUserType>, (), <rustc_middle::ty::ParamEnvAnd<rustc_middle::traits::query::type_op::AscribeUserType> as rustc_trait_selection::traits::query::type_op::TypeOp>::fully_perform::{closure#0}>
  11: <rustc_middle::ty::ParamEnvAnd<rustc_middle::traits::query::type_op::AscribeUserType> as rustc_trait_selection::traits::query::type_op::TypeOp>::fully_perform
  12: <rustc_borrowck::type_check::TypeChecker>::ascribe_user_type
  13: rustc_borrowck::type_check::type_check
  14: rustc_borrowck::borrowck_collect_region_constraints
  15: <rustc_borrowck::root_cx::BorrowCheckRootCtxt>::do_mir_borrowck
  16: rustc_borrowck::mir_borrowck
      [... omitted 2 frames ...]
  17: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}
  18: std::panicking::catch_unwind::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures::sync::parallel::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_interface::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>>
  19: rustc_data_structures::sync::parallel::par_for_each_in::<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_interface::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}>
  20: <rustc_session::session::Session>::time::<(), rustc_interface::passes::run_required_analyses::{closure#1}>
  21: rustc_interface::passes::analysis
      [... omitted 2 frames ...]
  22: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
  23: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}>
  24: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  25: std::panicking::catch_unwind::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}>>
  26: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
  27: rustc_span::create_session_globals_then::<(), rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---
note: please make sure that you have updated to the latest nightly

note: rustc 1.96.0-nightly (baadf3b43 2026-03-20) running on aarch64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z next-solver

query stack during panic:
#0 [check_potentially_region_dependent_goals] reproving potentially region dependent HIR typeck goals for `bar
#1 [mir_borrowck] borrow-checking `bar`
#2 [analysis] running analysis passes on crate `ambiguity_due_to_uniquification_2`
end of query stack
------------------------------------------

---- [ui] tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-2.rs#next stdout end ----
---- [ui] tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-4.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-4.next/ambiguity-due-to-uniquification-4.next.stderr`
diff of stderr:

- error[E0284]: type annotations needed: cannot normalize `<T as Trait<'_>>::Type`
+ error[E0284]: type annotations needed
2   --> $DIR/ambiguity-due-to-uniquification-4.rs:17:44
3    |
4 LL | pub fn f<'a, 'b, T: Trait<'a> + Trait<'b>>(v: <T as Trait<'a>>::Type) {}

-    |                                            ^ cannot normalize `<T as Trait<'_>>::Type`
+    |                                            ^ cannot infer type
+    |
+    = note: cannot satisfy `<T as Trait<'_>>::Type == _`
6 
7 error: aborting due to 1 previous error
8 


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 traits/next-solver/assembly/ambiguity-due-to-uniquification-4.rs`

error in revision `next`: 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/traits/next-solver/assembly/ambiguity-due-to-uniquification-4.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/traits/next-solver/assembly/ambiguity-due-to-uniquification-4.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0284]: type annotations needed
##[error]  --> /checkout/tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-4.rs:17:44
   |
LL | pub fn f<'a, 'b, T: Trait<'a> + Trait<'b>>(v: <T as Trait<'a>>::Type) {}
   |                                            ^ cannot infer type
   |
   = note: cannot satisfy `<T as Trait<'_>>::Type == _`

error: aborting due to 1 previous error

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

---- [ui] tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-4.rs#next stdout end ----
---- [ui] tests/ui/traits/next-solver/async.rs#fail stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/async.fail/async.fail.stderr`
diff of stderr:

- error[E0271]: type mismatch resolving `() == i32`
+ error[E0271]: type mismatch resolving `<{async block@$DIR/async.rs:12:17: 12:22} as Future>::Output == i32`
2   --> $DIR/async.rs:12:17
3    |
4 LL |     needs_async(async {});

Note: some mismatched output was normalized before being compared
- error[E0271]: type mismatch resolving `<{async block@/checkout/tests/ui/traits/next-solver/async.rs:12:17: 12:22} as Future>::Output == i32`
-   --> /checkout/tests/ui/traits/next-solver/async.rs:12:17
+ error[E0271]: type mismatch resolving `<{async block@$DIR/async.rs:12:17: 12:22} as Future>::Output == i32`


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 traits/next-solver/async.rs`

error in revision `fail`: 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/traits/next-solver/async.rs" "-Zthreads=1" "-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" "--cfg" "fail" "--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/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/async.fail" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2021" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<{async block@/checkout/tests/ui/traits/next-solver/async.rs:12:17: 12:22} as Future>::Output == i32`
##[error]  --> /checkout/tests/ui/traits/next-solver/async.rs:12:17
   |
LL |     needs_async(async {});
   |     ----------- ^^^^^^^^ types differ
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `needs_async`
  --> /checkout/tests/ui/traits/next-solver/async.rs:8:31
   |
LL | fn needs_async(_: impl Future<Output = i32>) {}
   |                               ^^^^^^^^^^^^ required by this bound in `needs_async`

error: aborting due to 1 previous error

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

---- [ui] tests/ui/traits/next-solver/async.rs#fail stdout end ----
---- [ui] tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers/non-wf-in-coerce-pointers.stderr`
diff of stderr:

- error[E0277]: the trait bound `(): Wf` is not satisfied
+ error[E0271]: type mismatch resolving `<() as Wf>::Assoc == _`
2   --> $DIR/non-wf-in-coerce-pointers.rs:8:8
3    |
4 LL |     f: &'static <() as Wf>::Assoc,

-    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Wf` is not implemented for `()`
+    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+ 
+ error[E0277]: the trait bound `(): Wf` is not satisfied
+   --> $DIR/non-wf-in-coerce-pointers.rs:8:17
6    |
+ LL |     f: &'static <() as Wf>::Assoc,
+    |                 ^^^^^^^^^^^^^^^^^ the trait `Wf` is not implemented for `()`
+    |
7 help: this trait has no implementations, consider adding one
8   --> $DIR/non-wf-in-coerce-pointers.rs:3:1
9    |

21    = note: expected reference `&()`
22               found reference `&'static <() as Wf>::Assoc`
23 
- error[E0277]: the trait bound `(): Wf` is not satisfied
+ error[E0271]: type mismatch resolving `<() as Wf>::Assoc == _`
25   --> $DIR/non-wf-in-coerce-pointers.rs:14:18
26    |
27 LL |     let y: &() = x.f;

-    |                  ^^^ the trait `Wf` is not implemented for `()`
-    |
- help: this trait has no implementations, consider adding one
-   --> $DIR/non-wf-in-coerce-pointers.rs:3:1
-    |
- LL | trait Wf {
---
40 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs:8:17
+ error[E0271]: type mismatch resolving `<() as Wf>::Assoc == _`
+    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+ 
+ error[E0277]: the trait bound `(): Wf` is not satisfied
+   --> $DIR/non-wf-in-coerce-pointers.rs:8:17
+ LL |     f: &'static <() as Wf>::Assoc,
+    |                 ^^^^^^^^^^^^^^^^^ the trait `Wf` is not implemented for `()`
+    |
+ error[E0271]: type mismatch resolving `<() as Wf>::Assoc == _`
+    |                  ^^^ types differ
+ error: aborting due to 4 previous errors
+ Some errors have detailed explanations: E0271, E0277, E0308.
+ For more information about an error, try `rustc --explain E0271`.


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 traits/next-solver/coercion/non-wf-in-coerce-pointers.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/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs" "-Zthreads=1" "-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/traits/next-solver/coercion/non-wf-in-coerce-pointers" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<() as Wf>::Assoc == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs:8:8
   |
LL |     f: &'static <() as Wf>::Assoc,
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ

error[E0277]: the trait bound `(): Wf` is not satisfied
##[error]  --> /checkout/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs:8:17
   |
LL |     f: &'static <() as Wf>::Assoc,
   |                 ^^^^^^^^^^^^^^^^^ the trait `Wf` is not implemented for `()`
   |
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs:3:1
   |
LL | trait Wf {
   | ^^^^^^^^

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs:14:18
   |
LL |     let y: &() = x.f;
   |            ---   ^^^ types differ
   |            |
   |            expected due to this
   |
   = note: expected reference `&()`
              found reference `&'static <() as Wf>::Assoc`

error[E0271]: type mismatch resolving `<() as Wf>::Assoc == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs:14:18
   |
LL |     let y: &() = x.f;
   |                  ^^^ types differ

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0271, E0277, E0308.
---
---- [ui] tests/ui/traits/next-solver/coroutine.rs#fail stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/coroutine.fail/coroutine.fail.stderr`
diff of stderr:

16 LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
17    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `needs_coroutine`
18 
- error: aborting due to 1 previous error
+ error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine.rs:20:9: 20:11} as Coroutine<A>>::Yield == B`
+   --> $DIR/coroutine.rs:20:9
+    |
+ LL |       needs_coroutine(
+    |       --------------- required by a bound introduced by this call
+ LL |           #[coroutine]
---
+    |
+ note: required by a bound in `needs_coroutine`
+   --> $DIR/coroutine.rs:14:41
+    |
+ LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
+    |                                         ^^^^^^^^^ required by this bound in `needs_coroutine`
20 
- For more information about this error, try `rustc --explain E0277`.
+ error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine.rs:20:9: 20:11} as Coroutine<A>>::Return == C`
+   --> $DIR/coroutine.rs:20:9
+    |
+ LL |       needs_coroutine(
+    |       --------------- required by a bound introduced by this call
+ LL |           #[coroutine]
---
+    |
+ note: required by a bound in `needs_coroutine`
+   --> $DIR/coroutine.rs:14:52
+    |
+ LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
+    |                                                    ^^^^^^^^^^ required by this bound in `needs_coroutine`
+ 
+ error: aborting due to 3 previous errors
+ 
+ Some errors have detailed explanations: E0271, E0277.
+ For more information about an error, try `rustc --explain E0271`.
22 

Note: some mismatched output was normalized before being compared
- error[E0271]: type mismatch resolving `<{coroutine@/checkout/tests/ui/traits/next-solver/coroutine.rs:20:9: 20:11} as Coroutine<A>>::Yield == B`
-   --> /checkout/tests/ui/traits/next-solver/coroutine.rs:20:9
- LL | |             //[fail]~^ ERROR Coroutine<A>` is not satisfied
-   --> /checkout/tests/ui/traits/next-solver/coroutine.rs:14:41
- error[E0271]: type mismatch resolving `<{coroutine@/checkout/tests/ui/traits/next-solver/coroutine.rs:20:9: 20:11} as Coroutine<A>>::Return == C`
-   --> /checkout/tests/ui/traits/next-solver/coroutine.rs:20:9
- LL | |             //[fail]~^ ERROR Coroutine<A>` is not satisfied
-   --> /checkout/tests/ui/traits/next-solver/coroutine.rs:14:52
+ error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine.rs:20:9: 20:11} as Coroutine<A>>::Yield == B`
+   --> $DIR/coroutine.rs:20:9
+    |
+ LL |       needs_coroutine(
+    |       --------------- required by a bound introduced by this call
+ LL |           #[coroutine]
---
+    |
+ note: required by a bound in `needs_coroutine`
+   --> $DIR/coroutine.rs:14:41
+    |
+ LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
+    |                                         ^^^^^^^^^ required by this bound in `needs_coroutine`
+ error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine.rs:20:9: 20:11} as Coroutine<A>>::Return == C`
+   --> $DIR/coroutine.rs:20:9
+    |
+ LL |       needs_coroutine(
+    |       --------------- required by a bound introduced by this call
+ LL |           #[coroutine]
---
+    |
+ note: required by a bound in `needs_coroutine`
+   --> $DIR/coroutine.rs:14:52
+    |
+ LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
+    |                                                    ^^^^^^^^^^ required by this bound in `needs_coroutine`
+ 
+ error: aborting due to 3 previous errors
+ 
+ Some errors have detailed explanations: E0271, E0277.
+ For more information about an error, try `rustc --explain E0271`.


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 traits/next-solver/coroutine.rs`

error in revision `fail`: 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/traits/next-solver/coroutine.rs" "-Zthreads=1" "-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" "--cfg" "fail" "--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/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/coroutine.fail" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2021" "-Znext-solver" "--diagnostic-width=300"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `{coroutine@/checkout/tests/ui/traits/next-solver/coroutine.rs:20:9: 20:11}: Coroutine<A>` is not satisfied
##[error]  --> /checkout/tests/ui/traits/next-solver/coroutine.rs:20:9
   |
LL |       needs_coroutine(
   |       --------------- required by a bound introduced by this call
LL |           #[coroutine]
LL | /         || {
LL | |             //[fail]~^ ERROR Coroutine<A>` is not satisfied
LL | |             yield ();
LL | |         },
   | |_________^ the nightly-only, unstable trait `Coroutine<A>` is not implemented for `{coroutine@/checkout/tests/ui/traits/next-solver/coroutine.rs:20:9: 20:11}`
   |
note: required by a bound in `needs_coroutine`
  --> /checkout/tests/ui/traits/next-solver/coroutine.rs:14:28
   |
LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `needs_coroutine`

error[E0271]: type mismatch resolving `<{coroutine@/checkout/tests/ui/traits/next-solver/coroutine.rs:20:9: 20:11} as Coroutine<A>>::Yield == B`
##[error]  --> /checkout/tests/ui/traits/next-solver/coroutine.rs:20:9
   |
LL |       needs_coroutine(
   |       --------------- required by a bound introduced by this call
LL |           #[coroutine]
LL | /         || {
LL | |             //[fail]~^ ERROR Coroutine<A>` is not satisfied
LL | |             yield ();
LL | |         },
   | |_________^ types differ
   |
note: required by a bound in `needs_coroutine`
  --> /checkout/tests/ui/traits/next-solver/coroutine.rs:14:41
   |
LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
   |                                         ^^^^^^^^^ required by this bound in `needs_coroutine`

error[E0271]: type mismatch resolving `<{coroutine@/checkout/tests/ui/traits/next-solver/coroutine.rs:20:9: 20:11} as Coroutine<A>>::Return == C`
##[error]  --> /checkout/tests/ui/traits/next-solver/coroutine.rs:20:9
   |
LL |       needs_coroutine(
   |       --------------- required by a bound introduced by this call
LL |           #[coroutine]
LL | /         || {
LL | |             //[fail]~^ ERROR Coroutine<A>` is not satisfied
LL | |             yield ();
LL | |         },
   | |_________^ types differ
   |
note: required by a bound in `needs_coroutine`
  --> /checkout/tests/ui/traits/next-solver/coroutine.rs:14:52
   |
LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
   |                                                    ^^^^^^^^^^ required by this bound in `needs_coroutine`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0271, E0277.
For more information about an error, try `rustc --explain E0271`.
------------------------------------------

---- [ui] tests/ui/traits/next-solver/coroutine.rs#fail stdout end ----
---- [ui] tests/ui/traits/next-solver/cycles/coinduction/item-bound-via-impl-where-clause.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/cycles/coinduction/item-bound-via-impl-where-clause.next/item-bound-via-impl-where-clause.next.stderr`
diff of stderr:

16 LL |     let s: String = transmute::<_, String>(vec![65_u8, 66, 67]);
17    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 
- error[E0275]: overflow evaluating the requirement `<<Vec<u8> as Trait<String>>::Proof as Trait<String>>::Proof == String`
-   --> $DIR/item-bound-via-impl-where-clause.rs:31:21
-    |
- LL |     let s: String = transmute::<_, String>(vec![65_u8, 66, 67]);
-    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 
25 error[E0275]: overflow evaluating the requirement `<<Vec<u8> as Trait<String>>::Proof as Trait<String>>::Proof: Sized`
26   --> $DIR/item-bound-via-impl-where-clause.rs:31:21
27    |

36 LL |     let s: String = transmute::<_, String>(vec![65_u8, 66, 67]);
37    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 
- error[E0275]: overflow evaluating the requirement `<<Vec<u8> as Trait<String>>::Proof as Trait<String>>::Proof == _`
-   --> $DIR/item-bound-via-impl-where-clause.rs:31:21
-    |
- LL |     let s: String = transmute::<_, String>(vec![65_u8, 66, 67]);
-    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    |
-    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
- 
- error: aborting due to 6 previous errors
+ error: aborting due to 4 previous errors
48 
49 For more information about this error, try `rustc --explain E0275`.
---
To only update this specific test, also pass `--test-args traits/next-solver/cycles/coinduction/item-bound-via-impl-where-clause.rs`

error in revision `next`: 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/traits/next-solver/cycles/coinduction/item-bound-via-impl-where-clause.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/traits/next-solver/cycles/coinduction/item-bound-via-impl-where-clause.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0275]: overflow evaluating the requirement `Vec<u8>: Trait<String>`
##[error]  --> /checkout/tests/ui/traits/next-solver/cycles/coinduction/item-bound-via-impl-where-clause.rs:31:33
   |
LL |     let s: String = transmute::<_, String>(vec![65_u8, 66, 67]);
   |                                 ^
   |
note: required by a bound in `transmute`
  --> /checkout/tests/ui/traits/next-solver/cycles/coinduction/item-bound-via-impl-where-clause.rs:29:17
   |
LL | fn transmute<L: Trait<R>, R>(r: L) -> <L::Proof as Trait<R>>::Proof { r }
   |                 ^^^^^^^^ required by this bound in `transmute`

error[E0275]: overflow evaluating the requirement `<<Vec<u8> as Trait<String>>::Proof as Trait<String>>::Proof == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/cycles/coinduction/item-bound-via-impl-where-clause.rs:31:21
   |
LL |     let s: String = transmute::<_, String>(vec![65_u8, 66, 67]);
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0275]: overflow evaluating the requirement `<<Vec<u8> as Trait<String>>::Proof as Trait<String>>::Proof: Sized`
##[error]  --> /checkout/tests/ui/traits/next-solver/cycles/coinduction/item-bound-via-impl-where-clause.rs:31:21
   |
LL |     let s: String = transmute::<_, String>(vec![65_u8, 66, 67]);
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: the return type of a function must have a statically known size

error[E0275]: overflow evaluating the requirement `<<Vec<u8> as Trait<String>>::Proof as Trait<String>>::Proof well-formed`
##[error]  --> /checkout/tests/ui/traits/next-solver/cycles/coinduction/item-bound-via-impl-where-clause.rs:31:21
   |
LL |     let s: String = transmute::<_, String>(vec![65_u8, 66, 67]);
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0275`.
---
To only update this specific test, also pass `--test-args traits/next-solver/cycles/normalizes-to-is-not-productive.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/traits/next-solver/cycles/normalizes-to-is-not-productive.rs" "-Zthreads=1" "-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/traits/next-solver/cycles/normalizes-to-is-not-productive" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<Foo as Trait<T>>::Assoc == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/cycles/normalizes-to-is-not-productive.rs:42:31
   |
---
diff of stderr:

2   --> $DIR/alias_relate_error_uses_structurally_normalize.rs:24:9
3    |
4 LL |     bar(foo);
-    |     --- ^^^ expected `u32`, found `u64`
+    |     --- ^^^ type mismatch resolving `<Foo<_> as Trait>::Assoc == u32`
6    |     |
7    |     required by a bound introduced by this call
8    |

+ note: types differ
---
11    |

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/next-solver/diagnostics/alias_relate_error_uses_structurally_normalize.rs:17:18
+    |     --- ^^^ type mismatch resolving `<Foo<_> as Trait>::Assoc == u32`
+ note: types differ
+   --> $DIR/alias_relate_error_uses_structurally_normalize.rs:17:18
+    |
+ LL |     type Assoc = u64;
+    |                  ^^^


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 traits/next-solver/diagnostics/alias_relate_error_uses_structurally_normalize.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/traits/next-solver/diagnostics/alias_relate_error_uses_structurally_normalize.rs" "-Zthreads=1" "-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/traits/next-solver/diagnostics/alias_relate_error_uses_structurally_normalize" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<Foo<_> as Trait>::Assoc == u32`
##[error]  --> /checkout/tests/ui/traits/next-solver/diagnostics/alias_relate_error_uses_structurally_normalize.rs:24:9
   |
LL |     bar(foo);
   |     --- ^^^ type mismatch resolving `<Foo<_> as Trait>::Assoc == u32`
   |     |
   |     required by a bound introduced by this call
   |
note: types differ
  --> /checkout/tests/ui/traits/next-solver/diagnostics/alias_relate_error_uses_structurally_normalize.rs:17:18
   |
LL |     type Assoc = u64;
   |                  ^^^
note: required by a bound in `bar`
  --> /checkout/tests/ui/traits/next-solver/diagnostics/alias_relate_error_uses_structurally_normalize.rs:20:17
   |
LL | fn bar<T: Trait<Assoc = u32>>(_: T) {}
   |                 ^^^^^^^^^^^ required by this bound in `bar`

error: aborting due to 1 previous error

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

---- [ui] tests/ui/traits/next-solver/diagnostics/alias_relate_error_uses_structurally_normalize.rs stdout end ----
---- [ui] tests/ui/traits/next-solver/diagnostics/projection-trait-ref.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/diagnostics/projection-trait-ref/projection-trait-ref.stderr`
diff of stderr:

9 LL | fn test_poly<T: Trait>() {
10    |               +++++++
11 
+ error[E0271]: type mismatch resolving `<T as Trait>::Assoc == _`
+   --> $DIR/projection-trait-ref.rs:8:12
+    |
---
To only update this specific test, also pass `--test-args traits/next-solver/diagnostics/projection-trait-ref.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/traits/next-solver/diagnostics/projection-trait-ref.rs" "-Zthreads=1" "-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/traits/next-solver/diagnostics/projection-trait-ref" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `T: Trait` is not satisfied
##[error]  --> /checkout/tests/ui/traits/next-solver/diagnostics/projection-trait-ref.rs:8:12
   |
LL |     let x: <T as Trait>::Assoc = ();
   |            ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T`
   |
help: consider restricting type parameter `T` with trait `Trait`
   |
LL | fn test_poly<T: Trait>() {
   |               +++++++

error[E0271]: type mismatch resolving `<T as Trait>::Assoc == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/diagnostics/projection-trait-ref.rs:8:12
   |
---
diff of stderr:

- error[E0277]: the trait bound `for<'a> (): Trait<'a>` is not satisfied
-   --> $DIR/dont-ice-on-bad-transmute-in-typeck.rs:7:22
+ error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
+   --> $DIR/dont-ice-on-bad-transmute-in-typeck.rs:7:11
3    |
4 LL | fn foo(x: for<'a> fn(<() as Trait<'a>>::Assoc)) {
-    |                      ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Trait<'a>` is not implemented for `()`
-    |
- help: this trait has no implementations, consider adding one
-   --> $DIR/dont-ice-on-bad-transmute-in-typeck.rs:3:1
-    |
- LL | trait Trait<'a> {
-    | ^^^^^^^^^^^^^^^
+    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
12 
- error[E0277]: the trait bound `for<'a> (): Trait<'a>` is not satisfied
+ error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
14   --> $DIR/dont-ice-on-bad-transmute-in-typeck.rs:7:8
15    |
16 LL | fn foo(x: for<'a> fn(<() as Trait<'a>>::Assoc)) {

-    |        ^ the trait `for<'a> Trait<'a>` is not implemented for `()`
-    |
- help: this trait has no implementations, consider adding one
-   --> $DIR/dont-ice-on-bad-transmute-in-typeck.rs:3:1
-    |
- LL | trait Trait<'a> {
-    | ^^^^^^^^^^^^^^^
+    |        ^ types differ
24 
- error[E0277]: the trait bound `for<'a> (): Trait<'a>` is not satisfied
+ error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
26   --> $DIR/dont-ice-on-bad-transmute-in-typeck.rs:11:14
27    |
28 LL |     unsafe { std::mem::transmute::<_, ()>(x); }

-    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Trait<'a>` is not implemented for `()`
---
- LL | trait Trait<'a> {
-    | ^^^^^^^^^^^^^^^
+    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
36 
- error[E0277]: the trait bound `for<'a> (): Trait<'a>` is not satisfied
+ error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
38   --> $DIR/dont-ice-on-bad-transmute-in-typeck.rs:11:36
39    |
40 LL |     unsafe { std::mem::transmute::<_, ()>(x); }

-    |                                    ^ the trait `for<'a> Trait<'a>` is not implemented for `()`
---
- LL | trait Trait<'a> {
-    | ^^^^^^^^^^^^^^^
+    |                                    ^ types differ
48 
- error[E0277]: the trait bound `for<'a> (): Trait<'a>` is not satisfied
+ error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
50   --> $DIR/dont-ice-on-bad-transmute-in-typeck.rs:11:43
51    |
52 LL |     unsafe { std::mem::transmute::<_, ()>(x); }

-    |                                           ^ the trait `for<'a> Trait<'a>` is not implemented for `()`
---
- LL | trait Trait<'a> {
-    | ^^^^^^^^^^^^^^^
+    |                                           ^ types differ
60 
- error[E0277]: the trait bound `for<'a> (): Trait<'a>` is not satisfied
+ error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
62   --> $DIR/dont-ice-on-bad-transmute-in-typeck.rs:7:1
63    |
64 LL | fn foo(x: for<'a> fn(<() as Trait<'a>>::Assoc)) {

-    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Trait<'a>` is not implemented for `()`
-    |
- help: this trait has no implementations, consider adding one
-   --> $DIR/dont-ice-on-bad-transmute-in-typeck.rs:3:1
---
76 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/next-solver/dont-ice-on-bad-transmute-in-typeck.rs:7:11
+ error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
+   --> $DIR/dont-ice-on-bad-transmute-in-typeck.rs:7:11
+    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+ error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
+    |        ^ types differ
+ error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
+    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+ error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
+    |                                    ^ types differ
+ error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
+    |                                           ^ types differ
+ error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+ For more information about this error, try `rustc --explain E0271`.


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 traits/next-solver/dont-ice-on-bad-transmute-in-typeck.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/traits/next-solver/dont-ice-on-bad-transmute-in-typeck.rs" "-Zthreads=1" "-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/traits/next-solver/dont-ice-on-bad-transmute-in-typeck" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/dont-ice-on-bad-transmute-in-typeck.rs:7:11
   |
LL | fn foo(x: for<'a> fn(<() as Trait<'a>>::Assoc)) {
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ

error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/dont-ice-on-bad-transmute-in-typeck.rs:7:8
   |
LL | fn foo(x: for<'a> fn(<() as Trait<'a>>::Assoc)) {
   |        ^ types differ

error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/dont-ice-on-bad-transmute-in-typeck.rs:11:14
   |
LL |     unsafe { std::mem::transmute::<_, ()>(x); }
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ

error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/dont-ice-on-bad-transmute-in-typeck.rs:11:36
   |
LL |     unsafe { std::mem::transmute::<_, ()>(x); }
   |                                    ^ types differ

error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/dont-ice-on-bad-transmute-in-typeck.rs:11:43
   |
LL |     unsafe { std::mem::transmute::<_, ()>(x); }
   |                                           ^ types differ

error[E0271]: type mismatch resolving `<() as Trait<'a>>::Assoc == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/dont-ice-on-bad-transmute-in-typeck.rs:7:1
   |
LL | fn foo(x: for<'a> fn(<() as Trait<'a>>::Assoc)) {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ

error: aborting due to 6 previous errors

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

---- [ui] tests/ui/traits/next-solver/dont-ice-on-bad-transmute-in-typeck.rs stdout end ----
---- [ui] tests/ui/traits/next-solver/dyn-incompatibility.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/dyn-incompatibility/dyn-incompatibility.stderr`
diff of stderr:

43 LL | pub fn copy_any<T: std::marker::Copy>(t: &T) -> T {
44    |                  +++++++++++++++++++
45 
- error: aborting due to 3 previous errors
+ error[E0271]: type mismatch resolving `<dyn Setup<From = T> as Setup>::From == _`
+   --> $DIR/dyn-incompatibility.rs:12:5
+    |
+ LL |     copy::<dyn Setup<From=T>>(t)
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
47 
- Some errors have detailed explanations: E0277, E0308.
- For more information about an error, try `rustc --explain E0277`.
+ error: aborting due to 4 previous errors
+ 
+ Some errors have detailed explanations: E0271, E0277, E0308.
+ For more information about an error, try `rustc --explain E0271`.
50 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/next-solver/dyn-incompatibility.rs:12:5
+ error[E0271]: type mismatch resolving `<dyn Setup<From = T> as Setup>::From == _`
+   --> $DIR/dyn-incompatibility.rs:12:5
+    |
+ LL |     copy::<dyn Setup<From=T>>(t)
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+ error: aborting due to 4 previous errors
+ 
+ Some errors have detailed explanations: E0271, E0277, E0308.
+ For more information about an error, try `rustc --explain E0271`.
---
To only update this specific test, also pass `--test-args traits/next-solver/dyn-incompatibility.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/traits/next-solver/dyn-incompatibility.rs" "-Zthreads=1" "-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/traits/next-solver/dyn-incompatibility" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `T: Copy` is not satisfied in `dyn Setup<From = T>`
##[error]  --> /checkout/tests/ui/traits/next-solver/dyn-incompatibility.rs:12:12
   |
LL |     copy::<dyn Setup<From=T>>(t)
   |            ^^^^^^^^^^^^^^^^^ within `dyn Setup<From = T>`, the trait `Copy` is not implemented for `T`
   |
   = note: required because it appears within the type `dyn Setup<From = T>`
note: required by a bound in `copy`
  --> /checkout/tests/ui/traits/next-solver/dyn-incompatibility.rs:7:12
   |
LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
   |            ^^^^^ required by this bound in `copy`
help: consider restricting type parameter `T` with trait `Copy`
   |
LL | pub fn copy_any<T: std::marker::Copy>(t: &T) -> T {
   |                  +++++++++++++++++++

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/traits/next-solver/dyn-incompatibility.rs:12:31
   |
LL |     copy::<dyn Setup<From=T>>(t)
   |     ------------------------- ^ types differ
   |     |
   |     arguments to this function are incorrect
   |
   = note: expected reference `&<dyn Setup<From = T> as Setup>::From`
              found reference `&T`
note: function defined here
  --> /checkout/tests/ui/traits/next-solver/dyn-incompatibility.rs:7:4
   |
LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
   |    ^^^^                    --------------

error[E0277]: the trait bound `T: Copy` is not satisfied in `dyn Setup<From = T>`
##[error]  --> /checkout/tests/ui/traits/next-solver/dyn-incompatibility.rs:12:5
   |
LL |     copy::<dyn Setup<From=T>>(t)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `dyn Setup<From = T>`, the trait `Copy` is not implemented for `T`
   |
   = note: required because it appears within the type `dyn Setup<From = T>`
help: consider restricting type parameter `T` with trait `Copy`
   |
LL | pub fn copy_any<T: std::marker::Copy>(t: &T) -> T {
   |                  +++++++++++++++++++

error[E0271]: type mismatch resolving `<dyn Setup<From = T> as Setup>::From == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/dyn-incompatibility.rs:12:5
   |
LL |     copy::<dyn Setup<From=T>>(t)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0271, E0277, E0308.
---
---- [ui] tests/ui/traits/next-solver/fn-trait.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/fn-trait/fn-trait.stderr`
diff of stderr:

15 LL | fn require_fn(_: impl Fn() -> i32) {}
16    |                       ^^^^^^^^^^^ required by this bound in `require_fn`
17 
+ error[E0271]: type mismatch resolving `<unsafe fn() -> i32 as FnOnce<()>>::Output == i32`
+   --> $DIR/fn-trait.rs:20:16
+    |
+ LL |     require_fn(f as unsafe fn() -> i32);
+    |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^ types differ
+    |     |
+    |     required by a bound introduced by this call
+    |
+ note: required by a bound in `require_fn`
+   --> $DIR/fn-trait.rs:3:31
+    |
+ LL | fn require_fn(_: impl Fn() -> i32) {}
+    |                               ^^^ required by this bound in `require_fn`
+ 
18 error[E0277]: expected a `Fn()` closure, found `extern "C" fn() -> i32 {g}`
19   --> $DIR/fn-trait.rs:22:16
20    |

31 LL | fn require_fn(_: impl Fn() -> i32) {}
32    |                       ^^^^^^^^^^^ required by this bound in `require_fn`
33 
+ error[E0271]: type mismatch resolving `<extern "C" fn() -> i32 {g} as FnOnce<()>>::Output == i32`
+   --> $DIR/fn-trait.rs:22:16
+    |
+ LL |     require_fn(g);
+    |     ---------- ^ types differ
+    |     |
+    |     required by a bound introduced by this call
+    |
+ note: required by a bound in `require_fn`
+   --> $DIR/fn-trait.rs:3:31
+    |
+ LL | fn require_fn(_: impl Fn() -> i32) {}
+    |                               ^^^ required by this bound in `require_fn`
+ 
34 error[E0277]: expected a `Fn()` closure, found `extern "C" fn() -> i32`
35   --> $DIR/fn-trait.rs:24:16
36    |

47 LL | fn require_fn(_: impl Fn() -> i32) {}
48    |                       ^^^^^^^^^^^ required by this bound in `require_fn`
49 
+ error[E0271]: type mismatch resolving `<extern "C" fn() -> i32 as FnOnce<()>>::Output == i32`
+   --> $DIR/fn-trait.rs:24:16
+    |
+ LL |     require_fn(g as extern "C" fn() -> i32);
+    |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+    |     |
+    |     required by a bound introduced by this call
+    |
+ note: required by a bound in `require_fn`
+   --> $DIR/fn-trait.rs:3:31
+    |
+ LL | fn require_fn(_: impl Fn() -> i32) {}
+    |                               ^^^ required by this bound in `require_fn`
+ 
50 error[E0277]: expected a `Fn()` closure, found `unsafe fn() -> i32 {h}`
51   --> $DIR/fn-trait.rs:26:16
52    |

64 LL | fn require_fn(_: impl Fn() -> i32) {}
65    |                       ^^^^^^^^^^^ required by this bound in `require_fn`
66 
- error: aborting due to 4 previous errors
+ error[E0271]: type mismatch resolving `<unsafe fn() -> i32 {h} as FnOnce<()>>::Output == i32`
+   --> $DIR/fn-trait.rs:26:16
+    |
+ LL |     require_fn(h);
+    |     ---------- ^ types differ
+    |     |
+    |     required by a bound introduced by this call
+    |
+ note: required by a bound in `require_fn`
+   --> $DIR/fn-trait.rs:3:31
+    |
+ LL | fn require_fn(_: impl Fn() -> i32) {}
+    |                               ^^^ required by this bound in `require_fn`
68 
- For more information about this error, try `rustc --explain E0277`.
+ error: aborting due to 8 previous errors
+ 
---
-   --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:24:16
-   --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:3:31
-   --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:26:16
-   --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:3:31
+ error[E0271]: type mismatch resolving `<unsafe fn() -> i32 as FnOnce<()>>::Output == i32`
+   --> $DIR/fn-trait.rs:20:16
+    |
+ LL |     require_fn(f as unsafe fn() -> i32);
+    |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^ types differ
+    |     |
+    |     required by a bound introduced by this call
+    |
+ note: required by a bound in `require_fn`
+   --> $DIR/fn-trait.rs:3:31
+    |
+ LL | fn require_fn(_: impl Fn() -> i32) {}
+    |                               ^^^ required by this bound in `require_fn`
+ 
+ error[E0271]: type mismatch resolving `<extern "C" fn() -> i32 {g} as FnOnce<()>>::Output == i32`
+   --> $DIR/fn-trait.rs:22:16
+    |
+ LL |     require_fn(g);
+    |     ---------- ^ types differ
+    |     |
+    |     required by a bound introduced by this call
+    |
+ note: required by a bound in `require_fn`
+   --> $DIR/fn-trait.rs:3:31
+    |
+ LL | fn require_fn(_: impl Fn() -> i32) {}
+    |                               ^^^ required by this bound in `require_fn`
+ 
+ error[E0271]: type mismatch resolving `<extern "C" fn() -> i32 as FnOnce<()>>::Output == i32`
+   --> $DIR/fn-trait.rs:24:16
+    |
+ LL |     require_fn(g as extern "C" fn() -> i32);
+    |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+    |     |
+    |     required by a bound introduced by this call
+    |
+ note: required by a bound in `require_fn`
+   --> $DIR/fn-trait.rs:3:31
+    |
+ LL | fn require_fn(_: impl Fn() -> i32) {}
+    |                               ^^^ required by this bound in `require_fn`
+ 
+ error[E0271]: type mismatch resolving `<unsafe fn() -> i32 {h} as FnOnce<()>>::Output == i32`
+   --> $DIR/fn-trait.rs:26:16
+    |
+ LL |     require_fn(h);
+    |     ---------- ^ types differ
+    |     |
+    |     required by a bound introduced by this call
+    |
+ note: required by a bound in `require_fn`
+   --> $DIR/fn-trait.rs:3:31
+    |
+ LL | fn require_fn(_: impl Fn() -> i32) {}
+    |                               ^^^ required by this bound in `require_fn`
+ error: aborting due to 8 previous errors
+ 
+ Some errors have detailed explanations: E0271, E0277.
+ For more information about an error, try `rustc --explain E0271`.
---
To only update this specific test, also pass `--test-args traits/next-solver/fn-trait.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/traits/next-solver/fn-trait.rs" "-Zthreads=1" "-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/traits/next-solver/fn-trait" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0277]: expected a `Fn()` closure, found `unsafe fn() -> i32`
##[error]  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:20:16
   |
LL |     require_fn(f as unsafe fn() -> i32);
   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^ call the function in a closure: `|| unsafe { /* code */ }`
   |     |
   |     required by a bound introduced by this call
   |
   = help: the trait `Fn()` is not implemented for `unsafe fn() -> i32`
   = note: unsafe function cannot be called generically without an unsafe block
   = note: wrap the `unsafe fn() -> i32` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `require_fn`
  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:3:23
   |
LL | fn require_fn(_: impl Fn() -> i32) {}
   |                       ^^^^^^^^^^^ required by this bound in `require_fn`

error[E0271]: type mismatch resolving `<unsafe fn() -> i32 as FnOnce<()>>::Output == i32`
##[error]  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:20:16
   |
LL |     require_fn(f as unsafe fn() -> i32);
   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^ types differ
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `require_fn`
  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:3:31
   |
LL | fn require_fn(_: impl Fn() -> i32) {}
   |                               ^^^ required by this bound in `require_fn`

error[E0277]: expected a `Fn()` closure, found `extern "C" fn() -> i32 {g}`
##[error]  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:22:16
   |
LL |     require_fn(g);
   |     ---------- ^ expected an `Fn()` closure, found `extern "C" fn() -> i32 {g}`
   |     |
   |     required by a bound introduced by this call
   |
   = help: the trait `Fn()` is not implemented for fn item `extern "C" fn() -> i32 {g}`
   = note: wrap the `extern "C" fn() -> i32 {g}` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `require_fn`
  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:3:23
   |
LL | fn require_fn(_: impl Fn() -> i32) {}
   |                       ^^^^^^^^^^^ required by this bound in `require_fn`

error[E0271]: type mismatch resolving `<extern "C" fn() -> i32 {g} as FnOnce<()>>::Output == i32`
##[error]  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:22:16
   |
LL |     require_fn(g);
   |     ---------- ^ types differ
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `require_fn`
  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:3:31
   |
LL | fn require_fn(_: impl Fn() -> i32) {}
   |                               ^^^ required by this bound in `require_fn`

error[E0277]: expected a `Fn()` closure, found `extern "C" fn() -> i32`
##[error]  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:24:16
   |
LL |     require_fn(g as extern "C" fn() -> i32);
   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an `Fn()` closure, found `extern "C" fn() -> i32`
   |     |
   |     required by a bound introduced by this call
   |
   = help: the trait `Fn()` is not implemented for `extern "C" fn() -> i32`
   = note: wrap the `extern "C" fn() -> i32` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `require_fn`
  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:3:23
   |
LL | fn require_fn(_: impl Fn() -> i32) {}
   |                       ^^^^^^^^^^^ required by this bound in `require_fn`

error[E0271]: type mismatch resolving `<extern "C" fn() -> i32 as FnOnce<()>>::Output == i32`
##[error]  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:24:16
   |
LL |     require_fn(g as extern "C" fn() -> i32);
   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `require_fn`
  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:3:31
   |
LL | fn require_fn(_: impl Fn() -> i32) {}
   |                               ^^^ required by this bound in `require_fn`

error[E0277]: expected a `Fn()` closure, found `unsafe fn() -> i32 {h}`
##[error]  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:26:16
   |
LL |     require_fn(h);
   |     ---------- ^ call the function in a closure: `|| unsafe { /* code */ }`
   |     |
   |     required by a bound introduced by this call
   |
   = help: the trait `Fn()` is not implemented for fn item `unsafe fn() -> i32 {h}`
   = note: unsafe function cannot be called generically without an unsafe block
   = note: wrap the `unsafe fn() -> i32 {h}` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `require_fn`
  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:3:23
   |
LL | fn require_fn(_: impl Fn() -> i32) {}
   |                       ^^^^^^^^^^^ required by this bound in `require_fn`

error[E0271]: type mismatch resolving `<unsafe fn() -> i32 {h} as FnOnce<()>>::Output == i32`
##[error]  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:26:16
   |
LL |     require_fn(h);
   |     ---------- ^ types differ
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `require_fn`
  --> /checkout/tests/ui/traits/next-solver/fn-trait.rs:3:31
   |
LL | fn require_fn(_: impl Fn() -> i32) {}
   |                               ^^^ required by this bound in `require_fn`

error: aborting due to 8 previous errors

Some errors have detailed explanations: E0271, E0277.
---

13    = note: see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
14    = note: `#[warn(incomplete_features)]` on by default
15 
+ error[E0271]: type mismatch resolving `<*const T as ToUnit<'a>>::Unit == _`
+   --> $DIR/issue-118950-root-region.rs:14:1
+    |
+ LL | type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit;
+    | ^^^^^^^^^^^^^^^^^ types differ
+ 
16 error[E0277]: the trait bound `*const T: ToUnit<'a>` is not satisfied
17   --> $DIR/issue-118950-root-region.rs:14:1
18    |

26    | ^^^^^^^^^^^^^^^^
27 
28  WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: ['^0.Named(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a)), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc), .. }
- error: aborting due to 2 previous errors; 1 warning emitted
+ error: aborting due to 3 previous errors; 1 warning emitted
30 
- Some errors have detailed explanations: E0277, E0425.
- For more information about an error, try `rustc --explain E0277`.
+ Some errors have detailed explanations: E0271, E0277, E0425.
+ For more information about an error, try `rustc --explain E0271`.
33 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/next-solver/issue-118950-root-region.rs:14:1
+ error[E0271]: type mismatch resolving `<*const T as ToUnit<'a>>::Unit == _`
+   --> $DIR/issue-118950-root-region.rs:14:1
+    |
+ LL | type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit;
+    | ^^^^^^^^^^^^^^^^^ types differ
+ 
+ error: aborting due to 3 previous errors; 1 warning emitted
+ Some errors have detailed explanations: E0271, E0277, E0425.
+ For more information about an error, try `rustc --explain E0271`.
---
To only update this specific test, also pass `--test-args traits/next-solver/issue-118950-root-region.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/traits/next-solver/issue-118950-root-region.rs" "-Zthreads=1" "-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/traits/next-solver/issue-118950-root-region" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0425]: cannot find type `Missing` in this scope
##[error]  --> /checkout/tests/ui/traits/next-solver/issue-118950-root-region.rs:19:55
   |
LL | impl<T> Overlap<for<'a> fn(Assoc<'a, T>)> for T where Missing: Overlap<T> {}
   |                                                       ^^^^^^^ not found in this scope

warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes
##[warning]  --> /checkout/tests/ui/traits/next-solver/issue-118950-root-region.rs:5:12
   |
LL | #![feature(lazy_type_alias)]
   |            ^^^^^^^^^^^^^^^
   |
   = note: see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
   = note: `#[warn(incomplete_features)]` on by default

error[E0271]: type mismatch resolving `<*const T as ToUnit<'a>>::Unit == _`
##[error]  --> /checkout/tests/ui/traits/next-solver/issue-118950-root-region.rs:14:1
   |
LL | type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit;
   | ^^^^^^^^^^^^^^^^^ types differ

error[E0277]: the trait bound `*const T: ToUnit<'a>` is not satisfied
##[error]  --> /checkout/tests/ui/traits/next-solver/issue-118950-root-region.rs:14:1
   |
LL | type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit;
   | ^^^^^^^^^^^^^^^^^ the trait `ToUnit<'a>` is not implemented for `*const T`
   |
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/traits/next-solver/issue-118950-root-region.rs:8:1
   |
LL | trait ToUnit<'a> {
   | ^^^^^^^^^^^^^^^^

 WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: ['^0.Named(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a)), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc), .. }
error: aborting due to 3 previous errors; 1 warning emitted

Some errors have detailed explanations: E0271, E0277, E0425.
For more information about an error, try `rustc --explain E0271`.
------------------------------------------

---- [ui] tests/ui/traits/next-solver/issue-118950-root-region.rs stdout end ----
---- [ui] tests/ui/traits/next-solver/more-object-bound.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/more-object-bound/more-object-bound.stderr`
diff of stderr:

- error[E0271]: type mismatch resolving `A == B`
+ error[E0271]: type mismatch resolving `<dyn Trait<A = A, B = B> as SuperTrait>::A == B`
2   --> $DIR/more-object-bound.rs:12:17
3    |
4 LL |     foo::<A, B, dyn Trait<A = A, B = B>>(x)


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 traits/next-solver/more-object-bound.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/traits/next-solver/more-object-bound.rs" "-Zthreads=1" "-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/traits/next-solver/more-object-bound" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<dyn Trait<A = A, B = B> as SuperTrait>::A == B`
##[error]  --> /checkout/tests/ui/traits/next-solver/more-object-bound.rs:12:17
   |
LL |     foo::<A, B, dyn Trait<A = A, B = B>>(x)
   |                 ^^^^^^^^^^^^^^^^^^^^^^^ types differ
   |
   = note: required because it appears within the type `dyn Trait<A = A, B = B>`
note: required by a bound in `foo`
  --> /checkout/tests/ui/traits/next-solver/more-object-bound.rs:18:8
   |
LL | fn foo<A, B, T: ?Sized>(x: T::A) -> B
   |    --- required by a bound in this function
LL | where
LL |     T: Trait<B = B>,
   |        ^^^^^^^^^^^^ required by this bound in `foo`

error: aborting due to 1 previous error

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

---- [ui] tests/ui/traits/next-solver/more-object-bound.rs stdout end ----
---- [ui] tests/ui/traits/next-solver/normalize/two-projection-param-candidates-are-ambiguous.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/normalize/two-projection-param-candidates-are-ambiguous/two-projection-param-candidates-are-ambiguous.stderr`
diff of stderr:

- error[E0284]: type annotations needed: cannot normalize `<T as Foo>::Assoc`
+ error[E0284]: type annotations needed: cannot satisfy `<T as Foo>::Assoc == i32`
2   --> $DIR/two-projection-param-candidates-are-ambiguous.rs:26:17
3    |
4 LL |     needs_bar::<T>();

-    |                 ^ cannot normalize `<T as Foo>::Assoc`
+    |                 ^ cannot satisfy `<T as Foo>::Assoc == i32`
6    |
7 note: required for `T` to implement `Bar`
8   --> $DIR/two-projection-param-candidates-are-ambiguous.rs:21:9


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 traits/next-solver/normalize/two-projection-param-candidates-are-ambiguous.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/traits/next-solver/normalize/two-projection-param-candidates-are-ambiguous.rs" "-Zthreads=1" "-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/traits/next-solver/normalize/two-projection-param-candidates-are-ambiguous" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0284]: type annotations needed: cannot satisfy `<T as Foo>::Assoc == i32`
##[error]  --> /checkout/tests/ui/traits/next-solver/normalize/two-projection-param-candidates-are-ambiguous.rs:26:17
   |
LL |     needs_bar::<T>();
   |                 ^ cannot satisfy `<T as Foo>::Assoc == i32`
   |
note: required for `T` to implement `Bar`
  --> /checkout/tests/ui/traits/next-solver/normalize/two-projection-param-candidates-are-ambiguous.rs:21:9
   |
LL | impl<T> Bar for T where T: Foo<Assoc = i32> {}
   |         ^^^     ^              ----------- unsatisfied trait bound introduced here
note: required by a bound in `needs_bar`
  --> /checkout/tests/ui/traits/next-solver/normalize/two-projection-param-candidates-are-ambiguous.rs:23:17
   |
LL | fn needs_bar<T: Bar>() {}
   |                 ^^^ required by this bound in `needs_bar`

error: aborting due to 1 previous error

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

---- [ui] tests/ui/traits/next-solver/normalize/two-projection-param-candidates-are-ambiguous.rs stdout end ----
---- [ui] tests/ui/traits/trivial-unsized-projection-2.rs#bad_new stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/trivial-unsized-projection-2.bad_new/trivial-unsized-projection-2.bad_new.stderr`
diff of stderr:

+ error[E0271]: type mismatch resolving `<Tail as Bad>::Assert == _`
+   --> $DIR/trivial-unsized-projection-2.rs:22:12
+    |
+ LL | const FOO: <Tail as Bad>::Assert = todo!();
+    |            ^^^^^^^^^^^^^^^^^^^^^ types differ
+ 
1 error[E0277]: the size for values of type `[()]` cannot be known at compilation time
2   --> $DIR/trivial-unsized-projection-2.rs:22:12
3    |

49 LL |     type Assert: ?Sized
50    |                ++++++++
51 
- error: aborting due to 2 previous errors
+ error[E0271]: type mismatch resolving `<Tail as Bad>::Assert == _`
+   --> $DIR/trivial-unsized-projection-2.rs:22:36
+    |
+ LL | const FOO: <Tail as Bad>::Assert = todo!();
+    |                                    ^^^^^^^ types differ
53 
- For more information about this error, try `rustc --explain E0277`.
+ error: aborting due to 4 previous errors
+ 
+ Some errors have detailed explanations: E0271, E0277.
+ For more information about an error, try `rustc --explain E0271`.
55 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/trivial-unsized-projection-2.rs:22:12
-   --> /checkout/tests/ui/traits/trivial-unsized-projection-2.rs:22:36
+ error[E0271]: type mismatch resolving `<Tail as Bad>::Assert == _`
+   --> $DIR/trivial-unsized-projection-2.rs:22:12
+    |
+ LL | const FOO: <Tail as Bad>::Assert = todo!();
+    |            ^^^^^^^^^^^^^^^^^^^^^ types differ
+ 
+ error[E0271]: type mismatch resolving `<Tail as Bad>::Assert == _`
+   --> $DIR/trivial-unsized-projection-2.rs:22:36
+    |
+ LL | const FOO: <Tail as Bad>::Assert = todo!();
+    |                                    ^^^^^^^ types differ
+ error: aborting due to 4 previous errors
+ 
+ Some errors have detailed explanations: E0271, E0277.
+ For more information about an error, try `rustc --explain E0271`.
---
To only update this specific test, also pass `--test-args traits/trivial-unsized-projection-2.rs`

error in revision `bad_new`: 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/traits/trivial-unsized-projection-2.rs" "-Zthreads=1" "-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" "--cfg" "bad_new" "--check-cfg" "cfg(test,FALSE,good,bad,good_new,bad_new)" "--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/traits/trivial-unsized-projection-2.bad_new" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<Tail as Bad>::Assert == _`
##[error]  --> /checkout/tests/ui/traits/trivial-unsized-projection-2.rs:22:12
   |
LL | const FOO: <Tail as Bad>::Assert = todo!();
   |            ^^^^^^^^^^^^^^^^^^^^^ types differ

error[E0277]: the size for values of type `[()]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/traits/trivial-unsized-projection-2.rs:22:12
   |
LL | const FOO: <Tail as Bad>::Assert = todo!();
   |            ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `Tail`, the trait `Sized` is not implemented for `[()]`
note: required because it appears within the type `Tail`
  --> /checkout/tests/ui/traits/trivial-unsized-projection-2.rs:17:8
   |
LL | struct Tail([()]);
   |        ^^^^
note: required by a bound in `Bad::Assert`
  --> /checkout/tests/ui/traits/trivial-unsized-projection-2.rs:14:15
   |
LL |     type Assert
---

error[E0277]: the size for values of type `[()]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/traits/trivial-unsized-projection-2.rs:22:12
   |
LL | const FOO: <Tail as Bad>::Assert = todo!();
   |            ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `Tail`, the trait `Sized` is not implemented for `[()]`
note: required because it appears within the type `Tail`
  --> /checkout/tests/ui/traits/trivial-unsized-projection-2.rs:17:8
   |
LL | struct Tail([()]);
   |        ^^^^
note: required by a bound in `Bad::Assert`
  --> /checkout/tests/ui/traits/trivial-unsized-projection-2.rs:14:15
   |
LL |     type Assert
   |          ------ required by a bound in this associated type
LL |     where
LL |         Self: Sized;
   |               ^^^^^ required by this bound in `Bad::Assert`
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: consider relaxing the implicit `Sized` restriction
   |
LL |     type Assert: ?Sized
   |                ++++++++

error[E0271]: type mismatch resolving `<Tail as Bad>::Assert == _`
##[error]  --> /checkout/tests/ui/traits/trivial-unsized-projection-2.rs:22:36
   |
LL | const FOO: <Tail as Bad>::Assert = todo!();
   |                                    ^^^^^^^ types differ

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0271, E0277.
---
---- [ui] tests/ui/traits/trivial-unsized-projection.rs#bad_new stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/trivial-unsized-projection.bad_new/trivial-unsized-projection.bad_new.stderr`
diff of stderr:

+ error[E0271]: type mismatch resolving `<[()] as Bad>::Assert == _`
+   --> $DIR/trivial-unsized-projection.rs:20:12
+    |
+ LL | const FOO: <[()] as Bad>::Assert = todo!();
+    |            ^^^^^^^^^^^^^^^^^^^^^ types differ
+ 
1 error[E0277]: the size for values of type `[()]` cannot be known at compilation time
2   --> $DIR/trivial-unsized-projection.rs:20:12
3    |

39 LL |     type Assert: ?Sized
40    |                ++++++++
41 
- error: aborting due to 2 previous errors
+ error[E0271]: type mismatch resolving `<[()] as Bad>::Assert == _`
+   --> $DIR/trivial-unsized-projection.rs:20:36
+    |
+ LL | const FOO: <[()] as Bad>::Assert = todo!();
+    |                                    ^^^^^^^ types differ
43 
- For more information about this error, try `rustc --explain E0277`.
+ error: aborting due to 4 previous errors
+ 
+ Some errors have detailed explanations: E0271, E0277.
+ For more information about an error, try `rustc --explain E0271`.
45 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/trivial-unsized-projection.rs:20:12
-   --> /checkout/tests/ui/traits/trivial-unsized-projection.rs:20:36
+ error[E0271]: type mismatch resolving `<[()] as Bad>::Assert == _`
+   --> $DIR/trivial-unsized-projection.rs:20:12
+    |
+ LL | const FOO: <[()] as Bad>::Assert = todo!();
+    |            ^^^^^^^^^^^^^^^^^^^^^ types differ
+ 
+ error[E0271]: type mismatch resolving `<[()] as Bad>::Assert == _`
+   --> $DIR/trivial-unsized-projection.rs:20:36
+    |
+ LL | const FOO: <[()] as Bad>::Assert = todo!();
+    |                                    ^^^^^^^ types differ
+ error: aborting due to 4 previous errors
+ 
+ Some errors have detailed explanations: E0271, E0277.
+ For more information about an error, try `rustc --explain E0271`.
---
To only update this specific test, also pass `--test-args traits/trivial-unsized-projection.rs`

error in revision `bad_new`: 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/traits/trivial-unsized-projection.rs" "-Zthreads=1" "-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" "--cfg" "bad_new" "--check-cfg" "cfg(test,FALSE,good,bad,good_new,bad_new)" "--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/traits/trivial-unsized-projection.bad_new" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<[()] as Bad>::Assert == _`
##[error]  --> /checkout/tests/ui/traits/trivial-unsized-projection.rs:20:12
   |
LL | const FOO: <[()] as Bad>::Assert = todo!();
   |            ^^^^^^^^^^^^^^^^^^^^^ types differ

error[E0277]: the size for values of type `[()]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/traits/trivial-unsized-projection.rs:20:12
   |
LL | const FOO: <[()] as Bad>::Assert = todo!();
   |            ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[()]`
note: required by a bound in `Bad::Assert`
  --> /checkout/tests/ui/traits/trivial-unsized-projection.rs:14:15
---

error[E0277]: the size for values of type `[()]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/traits/trivial-unsized-projection.rs:20:12
   |
LL | const FOO: <[()] as Bad>::Assert = todo!();
   |            ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[()]`
note: required by a bound in `Bad::Assert`
  --> /checkout/tests/ui/traits/trivial-unsized-projection.rs:14:15
   |
LL |     type Assert
   |          ------ required by a bound in this associated type
LL |     where
LL |         Self: Sized;
   |               ^^^^^ required by this bound in `Bad::Assert`
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: consider relaxing the implicit `Sized` restriction
   |
LL |     type Assert: ?Sized
   |                ++++++++

error[E0271]: type mismatch resolving `<[()] as Bad>::Assert == _`
##[error]  --> /checkout/tests/ui/traits/trivial-unsized-projection.rs:20:36
   |
LL | const FOO: <[()] as Bad>::Assert = todo!();
   |                                    ^^^^^^^ types differ

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0271, E0277.
For more information about an error, try `rustc --explain E0271`.
------------------------------------------

---- [ui] tests/ui/traits/trivial-unsized-projection.rs#bad_new stdout end ----
---- [ui] tests/ui/typeck/bad-index-due-to-nested.rs#next stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/typeck/bad-index-due-to-nested.next/bad-index-due-to-nested.next.stderr`
diff of stderr:

51 LL |     map[&k]
52    |         +
53 
- error[E0277]: the trait bound `K: Hash` is not satisfied
+ error[E0271]: type mismatch resolving `<HashMap<K, V> as Index<&K>>::Output == _`
55   --> $DIR/bad-index-due-to-nested.rs:24:5
56    |
57 LL |     map[k]

-    |     ^^^^^^ the trait `Hash` is not implemented for `K`
-    |
- note: required for `HashMap<K, V>` to implement `Index<&K>`
-   --> $DIR/bad-index-due-to-nested.rs:11:12
-    |
- LL | impl<K, V> Index<&K> for HashMap<K, V>
-    |            ^^^^^^^^^     ^^^^^^^^^^^^^
- LL | where
- LL |     K: Hash,
-    |        ---- unsatisfied trait bound introduced here
- help: consider restricting type parameter `K` with trait `Hash`
-    |
- LL | fn index<'a, K: std::hash::Hash, V>(map: &'a HashMap<K, V>, k: K) -> &'a V {
-    |               +++++++++++++++++
+    |     ^^^^^^ types differ
72 
73 error: aborting due to 4 previous errors
74 
---
To only update this specific test, also pass `--test-args typeck/bad-index-due-to-nested.rs`

error in revision `next`: 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/typeck/bad-index-due-to-nested.rs" "-Zthreads=1" "-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" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,current,next)" "--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/typeck/bad-index-due-to-nested.next" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `K: Hash` is not satisfied
##[error]  --> /checkout/tests/ui/typeck/bad-index-due-to-nested.rs:24:5
   |
LL |     map[k]
   |     ^^^ the trait `Hash` is not implemented for `K`
   |
note: required for `HashMap<K, V>` to implement `Index<&K>`
  --> /checkout/tests/ui/typeck/bad-index-due-to-nested.rs:11:12
   |
LL | impl<K, V> Index<&K> for HashMap<K, V>
   |            ^^^^^^^^^     ^^^^^^^^^^^^^
LL | where
LL |     K: Hash,
   |        ---- unsatisfied trait bound introduced here
help: consider restricting type parameter `K` with trait `Hash`
   |
LL | fn index<'a, K: std::hash::Hash, V>(map: &'a HashMap<K, V>, k: K) -> &'a V {
   |               +++++++++++++++++

error[E0277]: the trait bound `V: Copy` is not satisfied
##[error]  --> /checkout/tests/ui/typeck/bad-index-due-to-nested.rs:24:5
   |
LL |     map[k]
   |     ^^^ the trait `Copy` is not implemented for `V`
   |
note: required for `HashMap<K, V>` to implement `Index<&K>`
  --> /checkout/tests/ui/typeck/bad-index-due-to-nested.rs:11:12
   |
LL | impl<K, V> Index<&K> for HashMap<K, V>
   |            ^^^^^^^^^     ^^^^^^^^^^^^^
...
LL |     V: Copy,
   |        ---- unsatisfied trait bound introduced here
help: consider restricting type parameter `V` with trait `Copy`
   |
LL | fn index<'a, K, V: std::marker::Copy>(map: &'a HashMap<K, V>, k: K) -> &'a V {
   |                  +++++++++++++++++++

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/typeck/bad-index-due-to-nested.rs:24:9
   |
LL | fn index<'a, K, V>(map: &'a HashMap<K, V>, k: K) -> &'a V {
   |              - found this type parameter
LL |     map[k]
   |         ^ expected `&K`, found type parameter `K`
   |
   = note:   expected reference `&_`
           found type parameter `_`
help: consider borrowing here
   |
LL |     map[&k]
   |         +

error[E0271]: type mismatch resolving `<HashMap<K, V> as Index<&K>>::Output == _`
##[error]  --> /checkout/tests/ui/typeck/bad-index-due-to-nested.rs:24:5
   |
LL |     map[k]
   |     ^^^^^^ types differ

Copy link
Copy Markdown
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

hmm, as an intermediate step, could you remove the NormalizesTo special handling and do this nested canonical stuff inside of NormalizesTo, with a strict requiremetn that the goal itself is not higher-ranked, so we don't need to deal with the binder jank?

What is the current breakage/bugs here btw

View changes since this review

ty::AliasTermKind::ProjectionTy
| ty::AliasTermKind::ProjectionConst
| ty::AliasTermKind::InherentTy
| ty::AliasTermKind::InherentConst
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.

an exhaustive match please (and comment)

// FIXME: Longterm canonical queries should deal with all placeholders
// created inside of the query directly instead of returning them to the
// caller.
let prev_universe = delegate.universe();
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.

i agree, annoying issue. I think we shouldn't canonicalize an input while inside of a binder, so not immediately clear how to handle higher-kinded Projection goals 🤔 I think this is definitely an issue, not happy with your current fix for it though 😅

goal: Goal<I, ty::ProjectionPredicate<I>>,
term: I::Term,
) {
) -> Result<(), NoSolution> {
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.

this should still hold inside of the nested candidate assemble instantiate 🤔 would expect that we use normal eq outside of it

@lcnr
Copy link
Copy Markdown
Contributor

lcnr commented Mar 24, 2026

especially: how many of these issues are due to diagnostics changes, and what are the non-diagnostics bugs?

@ShoyuVanilla
Copy link
Copy Markdown
Member Author

hmm, as an intermediate step, could you remove the NormalizesTo special handling and do this nested canonical stuff inside of NormalizesTo, with a strict requiremetn that the goal itself is not higher-ranked, so we don't need to deal with the binder jank?

Okay, I'll try this. Do you mean the following lines by NormalizesTo special handling?

// We treat normalizes-to goals specially here. In each iteration we take the
// RHS of the projection, replace it with a fresh inference variable, and only
// after evaluating that goal do we equate the fresh inference variable with the
// actual RHS of the predicate.
//
// This is both to improve caching, and to avoid using the RHS of the
// projection predicate to influence the normalizes-to candidate we select.
//
// Forgetting to replace the RHS with a fresh inference variable when we evaluate
// this goal results in an ICE.
if let Some(pred) = goal.predicate.as_normalizes_to() {

especially: how many of these issues are due to diagnostics changes, and what are the non-diagnostics bugs?

I guess currently all the remaning ones would be unblessed diagnostics drifts or fulfillment error reporting things as I haven't adjusted NormalizesTo related things there yet. But I'll double check it by adjusting them.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 31, 2026

☔ The latest upstream changes (presumably #154637) made this pull request unmergeable. Please resolve the merge conflicts.

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

4 participants