Skip to content

fix issue 144074, having so many same diagnostics makes it hard to re… #144818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lichuang
Copy link
Contributor

@lichuang lichuang commented Aug 2, 2025

fix issue #144074

use LocalDefId and ObligationCauseCodeHandle to skip duplicate ObligationCause.

@rustbot
Copy link
Collaborator

rustbot commented Aug 2, 2025

r? @fee1-dead

rustbot has assigned @fee1-dead.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 2, 2025
@rust-log-analyzer

This comment has been minimized.

@Kivooeo
Copy link
Contributor

Kivooeo commented Aug 2, 2025

You should run .x/ test --bless tests/ui to see if there any regressions

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
21 
- error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
-   --> $DIR/type-check-1.rs:23:29
-    |
- LL |         asm!("{}", out(reg) v[..]);
-    |                             ^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `[u64]`
-    = note: all inline asm arguments must have a statically known size
- 
- error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
-   --> $DIR/type-check-1.rs:26:31
-    |
- LL |         asm!("{}", inout(reg) v[..]);
-    |                               ^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `[u64]`
-    = note: all inline asm arguments must have a statically known size
- 
---
To only update this specific test, also pass `--test-args asm/type-check-1.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/asm/type-check-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" "--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/asm/type-check-1" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: invalid asm output
##[error]  --> /checkout/tests/ui/asm/type-check-1.rs:12:29
   |
LL |         asm!("{}", out(reg) 1 + 2);
   |                             ^^^^^ cannot assign to this expression

error: invalid asm output
##[error]  --> /checkout/tests/ui/asm/type-check-1.rs:14:31
   |
LL |         asm!("{}", inout(reg) 1 + 2);
   |                               ^^^^^ cannot assign to this expression

error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/asm/type-check-1.rs:20:28
   |
LL |         asm!("{}", in(reg) v[..]);
   |                            ^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u64]`
   = note: all inline asm arguments must have a statically known size

error: cannot use value of type `[u64]` for inline assembly
##[error]  --> /checkout/tests/ui/asm/type-check-1.rs:20:28
   |
LL |         asm!("{}", in(reg) v[..]);
   |                            ^^^^^
   |
   = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly

error: cannot use value of type `[u64]` for inline assembly
##[error]  --> /checkout/tests/ui/asm/type-check-1.rs:23:29
   |
LL |         asm!("{}", out(reg) v[..]);
   |                             ^^^^^
   |
   = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly

error: cannot use value of type `[u64]` for inline assembly
##[error]  --> /checkout/tests/ui/asm/type-check-1.rs:26:31
   |
LL |         asm!("{}", inout(reg) v[..]);
   |                               ^^^^^
   |
   = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly

error: aborting due to 6 previous errors
---
32 
- error[E0038]: the trait `Trait` is not dyn compatible
-   --> $DIR/associated-const-in-trait.rs:9:29
-    |
- LL |     const fn n() -> usize { Self::N }
-    |                             ^^^^^^^ `Trait` is not dyn compatible
-    |
- note: for a trait to be dyn compatible it needs to allow building a vtable
-       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-   --> $DIR/associated-const-in-trait.rs:4:11
-    |
---
To only update this specific test, also pass `--test-args associated-consts/associated-const-in-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/associated-consts/associated-const-in-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/associated-consts/associated-const-in-trait" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0038]: the trait `Trait` is not dyn compatible
##[error]  --> /checkout/tests/ui/associated-consts/associated-const-in-trait.rs:7:6
   |
---

error[E0038]: the trait `Trait` is not dyn compatible
##[error]  --> /checkout/tests/ui/associated-consts/associated-const-in-trait.rs:9:29
   |
LL |     const fn n() -> usize { Self::N }
   |                             ^^^^ `Trait` is not dyn compatible
   |
note: for a trait to be dyn compatible it needs to allow building a vtable
      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
  --> /checkout/tests/ui/associated-consts/associated-const-in-trait.rs:4:11
   |
---
------------------------------------------


---- [ui] tests/ui/associated-consts/associated-const-type-parameter-arrays-2.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/associated-consts/associated-const-type-parameter-arrays-2/associated-const-type-parameter-arrays-2.stderr`
diff of stderr:

6    |
7    = note: this may fail depending on what value the parameter takes
8 
- error: constant expression depends on a generic parameter
-   --> $DIR/associated-const-type-parameter-arrays-2.rs:16:18
-    |
- LL |     let _array = [4; <A as Foo>::Y];
-    |                  ^^^^^^^^^^^^^^^^^^
-    |
-    = note: this may fail depending on what value the parameter takes
- 
- error: aborting due to 2 previous errors
---
To only update this specific test, also pass `--test-args associated-consts/associated-const-type-parameter-arrays-2.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/associated-consts/associated-const-type-parameter-arrays-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" "--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/associated-consts/associated-const-type-parameter-arrays-2" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/associated-consts/associated-const-type-parameter-arrays-2.rs:16:22
   |
LL |     let _array = [4; <A as Foo>::Y];
   |                      ^^^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

error: aborting due to 1 previous error
------------------------------------------


---- [ui] tests/ui/associated-types/hr-associated-type-bound-object.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/associated-types/hr-associated-type-bound-object/hr-associated-type-bound-object.stderr`
diff of stderr:

66 LL | fn f<'a, T: X<'a> + ?Sized>(x: &<T as X<'a>>::U) where for<'b> <T as X<'b>>::U: Clone {
67    |                                                  ++++++++++++++++++++++++++++++++++++
68 
- error[E0277]: the trait bound `for<'b> <T as X<'b>>::U: Clone` is not satisfied
+ error[E0277]: the size for values of type `<T as X<'_>>::U` cannot be known at compilation time
70   --> $DIR/hr-associated-type-bound-object.rs:9:5
71    |
72 LL |     <<T as X<'_>>::U>::clone(x);

-    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'b> Clone` is not implemented for `<T as X<'b>>::U`
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
74    |
- note: required by a bound in `X`
-   --> $DIR/hr-associated-type-bound-object.rs:3:33
-    |
- LL | trait X<'a>
-    |       - required by a bound in this trait
- LL | where
- LL |     for<'b> <Self as X<'b>>::U: Clone,
-    |                                 ^^^^^ required by this bound in `X`
+    = help: the trait `Sized` is not implemented for `<T as X<'_>>::U`
+    = note: the return type of a function must have a statically known size
83 help: consider further restricting the associated type
84    |
- LL | fn f<'a, T: X<'a> + ?Sized>(x: &<T as X<'a>>::U) where for<'b> <T as X<'b>>::U: Clone {
-    |                                                  ++++++++++++++++++++++++++++++++++++
+ LL | fn f<'a, T: X<'a> + ?Sized>(x: &<T as X<'a>>::U) where <T as X<'_>>::U: Sized {
+    |                                                  ++++++++++++++++++++++++++++
87 
88 error: aborting due to 5 previous errors
89 


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 associated-types/hr-associated-type-bound-object.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/associated-types/hr-associated-type-bound-object.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/associated-types/hr-associated-type-bound-object" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `for<'b> <T as X<'b>>::U: Clone` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-object.rs:7:13
   |
LL | fn f<'a, T: X<'a> + ?Sized>(x: &<T as X<'a>>::U) {
   |             ^^^^^ the trait `for<'b> Clone` is not implemented for `<T as X<'b>>::U`
   |
note: required by a bound in `X`
  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-object.rs:3:33
   |
LL | trait X<'a>
   |       - required by a bound in this trait
LL | where
LL |     for<'b> <Self as X<'b>>::U: Clone,
   |                                 ^^^^^ required by this bound in `X`
help: consider further restricting the associated type
   |
LL | fn f<'a, T: X<'a> + ?Sized>(x: &<T as X<'a>>::U) where for<'b> <T as X<'b>>::U: Clone {
   |                                                  ++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `for<'b> <T as X<'b>>::U: Clone` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-object.rs:9:7
   |
LL |     <<T as X<'_>>::U>::clone(x);
   |       ^ the trait `for<'b> Clone` is not implemented for `<T as X<'b>>::U`
   |
note: required by a bound in `X::U`
  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-object.rs:3:33
   |
LL |     for<'b> <Self as X<'b>>::U: Clone,
   |                                 ^^^^^ required by this bound in `X::U`
LL | {
LL |     type U: ?Sized;
   |          - required by a bound in this associated type
help: consider further restricting the associated type
   |
LL | fn f<'a, T: X<'a> + ?Sized>(x: &<T as X<'a>>::U) where for<'b> <T as X<'b>>::U: Clone {
   |                                                  ++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as X<'_>>::U: Clone` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-object.rs:9:6
   |
LL |     <<T as X<'_>>::U>::clone(x);
   |      ^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<T as X<'_>>::U`
   |
help: consider further restricting the associated type
   |
LL | fn f<'a, T: X<'a> + ?Sized>(x: &<T as X<'a>>::U) where <T as X<'_>>::U: Clone {
   |                                                  ++++++++++++++++++++++++++++

error[E0277]: the trait bound `for<'b> <T as X<'b>>::U: Clone` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-object.rs:9:5
   |
LL |     <<T as X<'_>>::U>::clone(x);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'b> Clone` is not implemented for `<T as X<'b>>::U`
   |
note: required by a bound in `X`
  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-object.rs:3:33
   |
LL | trait X<'a>
   |       - required by a bound in this trait
LL | where
LL |     for<'b> <Self as X<'b>>::U: Clone,
   |                                 ^^^^^ required by this bound in `X`
help: consider further restricting the associated type
   |
LL | fn f<'a, T: X<'a> + ?Sized>(x: &<T as X<'a>>::U) where for<'b> <T as X<'b>>::U: Clone {
   |                                                  ++++++++++++++++++++++++++++++++++++

error[E0277]: the size for values of type `<T as X<'_>>::U` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-object.rs:9:5
   |
LL |     <<T as X<'_>>::U>::clone(x);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `<T as X<'_>>::U`
   = note: the return type of a function must have a statically known size
help: consider further restricting the associated type
   |
LL | fn f<'a, T: X<'a> + ?Sized>(x: &<T as X<'a>>::U) where <T as X<'_>>::U: Sized {
   |                                                  ++++++++++++++++++++++++++++

error: aborting due to 5 previous errors

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


---- [ui] tests/ui/associated-types/hr-associated-type-bound-param-2.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/associated-types/hr-associated-type-bound-param-2/hr-associated-type-bound-param-2.stderr`
diff of stderr:

80    |                                   ^^^^^ required by this bound in `Z`
81 
82 error[E0277]: the trait bound `str: Clone` is not satisfied
-   --> $DIR/hr-associated-type-bound-param-2.rs:10:9
-    |
- LL |         <T::W>::clone(x);
-    |         ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `str`
-    |
-    = help: the trait `Clone` is implemented for `String`
- note: required by a bound in `Z`
-   --> $DIR/hr-associated-type-bound-param-2.rs:6:35
-    |
- LL | trait Z<'a, T: ?Sized>
-    |       - required by a bound in this trait
- ...
- LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
-    |                                   ^^^^^ required by this bound in `Z`
- 
- error[E0277]: the trait bound `str: Clone` is not satisfied
99   --> $DIR/hr-associated-type-bound-param-2.rs:23:10
100    |
101 LL |     1u16.h("abc");

111 LL |     fn h(&self, x: &T::W) {
112    |        - required by a bound in this associated function
113 
- error: aborting due to 7 previous errors
+ error: aborting due to 6 previous errors
115 
---
To only update this specific test, also pass `--test-args associated-types/hr-associated-type-bound-param-2.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/associated-types/hr-associated-type-bound-param-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" "--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/associated-types/hr-associated-type-bound-param-2" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `str: Clone` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-2.rs:3:8
   |
LL |     T: Z<'a, u16>,
   |        ^^^^^^^^^^ the trait `Clone` is not implemented for `str`
   |
   = help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`
  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-2.rs:6:35
   |
LL | trait Z<'a, T: ?Sized>
   |       - required by a bound in this trait
...
LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
   |                                   ^^^^^ required by this bound in `Z`

error[E0277]: the trait bound `str: Clone` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-2.rs:18:14
   |
LL |     type W = str;
   |              ^^^ the trait `Clone` is not implemented for `str`
   |
   = help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`
  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-2.rs:6:35
   |
LL | trait Z<'a, T: ?Sized>
   |       - required by a bound in this trait
...
LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
   |                                   ^^^^^ required by this bound in `Z`

error[E0277]: the trait bound `str: Clone` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-2.rs:3:8
   |
LL |     T: Z<'a, u16>,
   |        ^^^^^^^^^^ the trait `Clone` is not implemented for `str`
   |
   = help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`
  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-2.rs:6:35
   |
LL | trait Z<'a, T: ?Sized>
   |       - required by a bound in this trait
...
LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
   |                                   ^^^^^ required by this bound in `Z`
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0277]: the trait bound `str: Clone` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-2.rs:10:10
   |
LL |         <T::W>::clone(x);
   |          ^^^^ the trait `Clone` is not implemented for `str`
   |
   = help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z::W`
  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-2.rs:6:35
   |
LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
   |                                   ^^^^^ required by this bound in `Z::W`
LL | {
LL |     type W: ?Sized;
   |          - required by a bound in this associated type

error[E0277]: the trait bound `str: Clone` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-2.rs:10:9
   |
LL |         <T::W>::clone(x);
   |         ^^^^^^^^^^^^^ the trait `Clone` is not implemented for `str`
   |
   = help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`
  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-2.rs:6:35
   |
LL | trait Z<'a, T: ?Sized>
   |       - required by a bound in this trait
...
LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
   |                                   ^^^^^ required by this bound in `Z`

error[E0277]: the trait bound `str: Clone` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-2.rs:23:10
   |
LL |     1u16.h("abc");
   |          ^ the trait `Clone` is not implemented for `str`
   |
   = help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z::h`
  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-2.rs:6:35
   |
LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
   |                                   ^^^^^ required by this bound in `Z::h`
...
LL |     fn h(&self, x: &T::W) {
   |        - required by a bound in this associated function

error: aborting due to 6 previous errors

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


---- [ui] tests/ui/associated-types/hr-associated-type-bound-param-6.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/associated-types/hr-associated-type-bound-param-6/hr-associated-type-bound-param-6.stderr`
diff of stderr:

33 LL |     fn f(x: &<T as X<'_, T>>::U) {
34    |        - required by a bound in this associated function
35 
- error[E0277]: the trait bound `i32: X<'_, i32>` is not satisfied
-   --> $DIR/hr-associated-type-bound-param-6.rs:18:27
-    |
- LL |     <(i32,) as X<i32>>::f("abc");
-    |                           ^^^^^ the trait `X<'_, i32>` is not implemented for `i32`
-    |
-    = help: the trait `X<'_, T>` is implemented for `(S,)`
- 
- error: aborting due to 4 previous errors
+ error: aborting due to 3 previous errors
45 
46 For more information about this error, try `rustc --explain E0277`.
---
To only update this specific test, also pass `--test-args associated-types/hr-associated-type-bound-param-6.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/associated-types/hr-associated-type-bound-param-6.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/associated-types/hr-associated-type-bound-param-6" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `for<'b> T: X<'b, T>` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-6.rs:12:12
   |
LL | impl<S, T> X<'_, T> for (S,) {
   |            ^^^^^^^^ the trait `for<'b> X<'b, T>` is not implemented for `T`
   |
help: consider restricting type parameter `T` with trait `X`
   |
LL | impl<S, T: for<'b> X<'b, T>> X<'_, T> for (S,) {
   |          ++++++++++++++++++

error[E0277]: the trait bound `for<'b> i32: X<'b, i32>` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-6.rs:18:5
   |
LL |     <(i32,) as X<i32>>::f("abc");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'b> X<'b, i32>` is not implemented for `i32`
   |
   = help: the trait `X<'_, T>` is implemented for `(S,)`

error[E0277]: the trait bound `for<'b> i32: X<'b, i32>` is not satisfied
##[error]  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-6.rs:18:18
   |
LL |     <(i32,) as X<i32>>::f("abc");
   |                  ^^^ the trait `for<'b> X<'b, i32>` is not implemented for `i32`
   |
   = help: the trait `X<'_, T>` is implemented for `(S,)`
note: required by a bound in `X::f`
  --> /checkout/tests/ui/associated-types/hr-associated-type-bound-param-6.rs:3:16
   |
LL |     for<'b> T: X<'b, T>,
   |                ^^^^^^^^ required by this bound in `X::f`
...
LL |     fn f(x: &<T as X<'_, T>>::U) {
   |        - required by a bound in this associated function

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0277`.
---
To only update this specific test, also pass `--test-args async-await/issue-84841.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/async-await/issue-84841.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/async-await/issue-84841" "-A" "unused" "-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=2018"
stdout: none
--- stderr -------------------------------
error[E0277]: the `?` operator can only be applied to values that implement `Try`
##[error]  --> /checkout/tests/ui/async-await/issue-84841.rs:9:5
   |
---
---- [ui] tests/ui/async-await/issue-98634.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/async-await/issue-98634/issue-98634.stderr`
diff of stderr:

28 LL |         StructAsync { callback }.await;
29    |                                  ^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found future
30    |
- note: required by a bound in `StructAsync`
-   --> $DIR/issue-98634.rs:9:35
+ note: required for `StructAsync<fn() -> impl Future<Output = ()> {callback}>` to implement `Future`
+   --> $DIR/issue-98634.rs:13:9
33    |
- LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
-    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
+ LL | impl<F> Future for StructAsync<F>
+    |         ^^^^^^     ^^^^^^^^^^^^^^
+ LL | where
+ LL |     F: Fn() -> Pin<Box<dyn Future<Output = ()>>>,
+    |                --------------------------------- unsatisfied trait bound introduced here
36 
37 error: aborting due to 3 previous errors
38 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/async-await/issue-98634.rs:13:9
+ note: required for `StructAsync<fn() -> impl Future<Output = ()> {callback}>` to implement `Future`
+   --> $DIR/issue-98634.rs:13:9
+ LL | impl<F> Future for StructAsync<F>
+    |         ^^^^^^     ^^^^^^^^^^^^^^
+ LL | where
+ LL |     F: Fn() -> Pin<Box<dyn Future<Output = ()>>>,
+    |                --------------------------------- unsatisfied trait bound introduced here


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/issue-98634.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/async-await/issue-98634.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/async-await/issue-98634" "-A" "unused" "-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"
stdout: none
--- stderr -------------------------------
error[E0271]: expected `callback` to return `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Future<Output = ()>`
##[error]  --> /checkout/tests/ui/async-await/issue-98634.rs:45:23
   |
LL |         StructAsync { callback }.await;
   |                       ^^^^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found future
   |
note: required by a bound in `StructAsync`
  --> /checkout/tests/ui/async-await/issue-98634.rs:9:35
   |
LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`

error[E0271]: expected `callback` to return `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Future<Output = ()>`
##[error]  --> /checkout/tests/ui/async-await/issue-98634.rs:45:9
   |
LL |         StructAsync { callback }.await;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found future
   |
note: required by a bound in `StructAsync`
  --> /checkout/tests/ui/async-await/issue-98634.rs:9:35
   |
LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`

error[E0271]: expected `callback` to return `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Future<Output = ()>`
##[error]  --> /checkout/tests/ui/async-await/issue-98634.rs:45:34
   |
LL |         StructAsync { callback }.await;
   |                                  ^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found future
   |
note: required for `StructAsync<fn() -> impl Future<Output = ()> {callback}>` to implement `Future`
  --> /checkout/tests/ui/async-await/issue-98634.rs:13:9
   |
LL | impl<F> Future for StructAsync<F>
   |         ^^^^^^     ^^^^^^^^^^^^^^
LL | where
LL |     F: Fn() -> Pin<Box<dyn Future<Output = ()>>>,
   |                --------------------------------- unsatisfied trait bound introduced here

error: aborting due to 3 previous errors

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


---- [ui] tests/ui/binop/binary-op-suggest-deref.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/binop/binary-op-suggest-deref/binary-op-suggest-deref.stderr`
diff of stderr:

295 LL |     _ = partial[..3] == *string_ref;
296    |                         +
297 
- error[E0277]: no implementation for `i32 & str`
-   --> $DIR/binary-op-suggest-deref.rs:78:17
-    |
- LL |     let _ = FOO & (*"Sized".to_string().into_boxed_str());
-    |                 ^ no implementation for `i32 & str`
-    |
-    = help: the trait `BitAnd<str>` is not implemented for `i32`
-    = help: the following other types implement trait `BitAnd<Rhs>`:
-              `&i32` implements `BitAnd<i32>`
-              `&i32` implements `BitAnd`
-              `i32` implements `BitAnd<&i32>`
-              `i32` implements `BitAnd`
- 
311 error[E0277]: the size for values of type `str` cannot be known at compilation time
312   --> $DIR/binary-op-suggest-deref.rs:78:17
313    |

---
To only update this specific test, also pass `--test-args binop/binary-op-suggest-deref.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/binop/binary-op-suggest-deref.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/binop/binary-op-suggest-deref" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:6:12
   |
LL |     if i < 0 {}
   |            ^ expected `&i64`, found integer
   |
help: consider dereferencing the borrow
   |
LL |     if *i < 0 {}
   |        +

error[E0277]: can't compare `&&{integer}` with `{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:15:13
   |
LL |     _ = foo == 0;
   |             ^^ no implementation for `&&{integer} == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&&{integer}`
help: consider dereferencing here
   |
LL |     _ = **foo == 0;
   |         ++

error[E0277]: can't compare `&{integer}` with `{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:17:13
   |
LL |     _ = foo == &0;
   |             ^^ no implementation for `&{integer} == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&{integer}`
   = note: required for `&&{integer}` to implement `PartialEq<&{integer}>`
help: consider dereferencing here
   |
LL |     _ = *foo == &0;
   |         +

error[E0277]: can't compare `&&&&&&{integer}` with `{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:19:17
   |
LL |     _ = &&&&foo == 0;
   |                 ^^ no implementation for `&&&&&&{integer} == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&&&&&&{integer}`
help: consider removing the borrows and dereferencing instead
   |
LL -     _ = &&&&foo == 0;
LL +     _ = **foo == 0;
   |

error[E0277]: can't compare `&{integer}` with `{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:21:14
   |
LL |     _ = *foo == 0;
   |              ^^ no implementation for `&{integer} == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&{integer}`
help: consider dereferencing here
   |
LL |     _ = **foo == 0;
   |         +

error[E0277]: can't compare `&&{integer}` with `{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:23:15
   |
LL |     _ = &&foo == &&0;
   |               ^^ no implementation for `&&{integer} == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&&{integer}`
   = note: required for `&&&{integer}` to implement `PartialEq<&{integer}>`
   = note: 1 redundant requirement hidden
   = note: required for `&&&&{integer}` to implement `PartialEq<&&{integer}>`
help: consider removing the borrows
   |
LL -     _ = &&foo == &&0;
LL +     _ = foo == &&0;
   |

error[E0277]: can't compare `&Box<{integer}>` with `{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:25:23
   |
LL |     _ = &Box::new(42) == 42;
   |                       ^^ no implementation for `&Box<{integer}> == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&Box<{integer}>`
help: consider removing the borrow and dereferencing instead
   |
LL -     _ = &Box::new(42) == 42;
LL +     _ = *Box::new(42) == 42;
   |

error[E0277]: can't compare `&Box<&Box<&{integer}>>` with `{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:27:35
   |
LL |     _ = &Box::new(&Box::new(&42)) == 42;
   |                                   ^^ no implementation for `&Box<&Box<&{integer}>> == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&Box<&Box<&{integer}>>`
help: consider removing the borrow and dereferencing instead
   |
LL -     _ = &Box::new(&Box::new(&42)) == 42;
LL +     _ = ****Box::new(&Box::new(&42)) == 42;
   |

error[E0277]: can't compare `{integer}` with `&&{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:31:11
   |
LL |     _ = 0 == foo;
   |           ^^ no implementation for `{integer} == &&{integer}`
   |
   = help: the trait `PartialEq<&&{integer}>` is not implemented for `{integer}`
help: consider dereferencing here
   |
LL |     _ = 0 == **foo;
   |              ++

error[E0277]: can't compare `{integer}` with `&{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:33:12
   |
LL |     _ = &0 == foo;
   |            ^^ no implementation for `{integer} == &{integer}`
   |
   = help: the trait `PartialEq<&{integer}>` is not implemented for `{integer}`
   = note: required for `&{integer}` to implement `PartialEq<&&{integer}>`
help: consider dereferencing here
   |
LL |     _ = &0 == *foo;
   |               +

error[E0277]: can't compare `{integer}` with `&&&&&&{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:35:11
   |
LL |     _ = 0 == &&&&foo;
   |           ^^ no implementation for `{integer} == &&&&&&{integer}`
   |
   = help: the trait `PartialEq<&&&&&&{integer}>` is not implemented for `{integer}`
help: consider removing the borrows and dereferencing instead
   |
LL -     _ = 0 == &&&&foo;
LL +     _ = 0 == **foo;
   |

error[E0277]: can't compare `{integer}` with `&{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:37:11
   |
LL |     _ = 0 == *foo;
   |           ^^ no implementation for `{integer} == &{integer}`
   |
   = help: the trait `PartialEq<&{integer}>` is not implemented for `{integer}`
help: consider dereferencing here
   |
LL |     _ = 0 == **foo;
   |              +

error[E0277]: can't compare `{integer}` with `&&{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:39:13
   |
LL |     _ = &&0 == &&foo;
   |             ^^ no implementation for `{integer} == &&{integer}`
   |
   = help: the trait `PartialEq<&&{integer}>` is not implemented for `{integer}`
   = note: required for `&{integer}` to implement `PartialEq<&&&{integer}>`
   = note: 1 redundant requirement hidden
   = note: required for `&&{integer}` to implement `PartialEq<&&&&{integer}>`
help: consider removing the borrows
   |
LL -     _ = &&0 == &&foo;
LL +     _ = &&0 == foo;
   |

error[E0277]: can't compare `Box<Box<{integer}>>` with `&&{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:43:33
   |
LL |     _ = &Box::new(Box::new(42)) == &foo;
   |                                 ^^ no implementation for `Box<Box<{integer}>> == &&{integer}`
   |
   = help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<Box<{integer}>>`
   = note: required for `&Box<Box<{integer}>>` to implement `PartialEq<&&&{integer}>`
help: consider dereferencing both sides of the expression
   |
LL -     _ = &Box::new(Box::new(42)) == &foo;
LL +     _ = **Box::new(Box::new(42)) == **foo;
   |

error[E0277]: can't compare `Box<{integer}>` with `&&{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:45:23
   |
LL |     _ = &Box::new(42) == &foo;
   |                       ^^ no implementation for `Box<{integer}> == &&{integer}`
   |
   = help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<{integer}>`
   = note: required for `&Box<{integer}>` to implement `PartialEq<&&&{integer}>`
help: consider dereferencing both sides of the expression
   |
LL -     _ = &Box::new(42) == &foo;
LL +     _ = *Box::new(42) == **foo;
   |

error[E0277]: can't compare `Box<Box<Box<Box<{integer}>>>>` with `&&{integer}`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:47:53
   |
LL |     _ = &Box::new(Box::new(Box::new(Box::new(42)))) == &foo;
   |                                                     ^^ no implementation for `Box<Box<Box<Box<{integer}>>>> == &&{integer}`
   |
   = help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<Box<Box<Box<{integer}>>>>`
   = note: required for `&Box<Box<Box<Box<{integer}>>>>` to implement `PartialEq<&&&{integer}>`
help: consider dereferencing both sides of the expression
   |
LL -     _ = &Box::new(Box::new(Box::new(Box::new(42)))) == &foo;
LL +     _ = ****Box::new(Box::new(Box::new(Box::new(42)))) == **foo;
   |

error[E0277]: can't compare `&&{integer}` with `Box<Box<Box<Box<{integer}>>>>`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:49:14
   |
LL |     _ = &foo == &Box::new(Box::new(Box::new(Box::new(42))));
   |              ^^ no implementation for `&&{integer} == Box<Box<Box<Box<{integer}>>>>`
   |
   = help: the trait `PartialEq<Box<Box<Box<Box<{integer}>>>>>` is not implemented for `&&{integer}`
   = note: required for `&&&{integer}` to implement `PartialEq<&Box<Box<Box<Box<{integer}>>>>>`
help: consider dereferencing both sides of the expression
   |
LL -     _ = &foo == &Box::new(Box::new(Box::new(Box::new(42))));
LL +     _ = **foo == ****Box::new(Box::new(Box::new(Box::new(42))));
   |

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:53:25
   |
LL |     _ = Box::new(42) == 42;
   |         ------------    ^^ expected `Box<{integer}>`, found integer
   |         |
   |         expected because this is `Box<{integer}>`
   |
   = note: expected struct `Box<{integer}>`
                found type `{integer}`
   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
help: store this in the heap by calling `Box::new`
   |
LL |     _ = Box::new(42) == Box::new(42);
   |                         +++++++++  +

error[E0277]: can't compare `&&{integer}` with `Foo`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:58:13
   |
LL |     _ = &&0 == Foo;
   |             ^^ no implementation for `&&{integer} == Foo`
   |
   = help: the trait `PartialEq<Foo>` is not implemented for `&&{integer}`
   = help: the following other types implement trait `PartialEq<Rhs>`:
             f128
             f16
             f32
             f64
             i128
             i16
             i32
             i64
           and 8 others

error[E0369]: binary operation `==` cannot be applied to type `Foo`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:60:13
   |
LL |     _ = Foo == &&0;
   |         --- ^^ --- &&{integer}
   |         |
   |         Foo
   |
note: an implementation of `PartialEq<&&{integer}>` might be missing for `Foo`
  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:57:5
   |
LL |     struct Foo;
   |     ^^^^^^^^^^ must implement `PartialEq<&&{integer}>`

error[E0277]: can't compare `&String` with `str`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:69:20
   |
LL |     _ = string_ref == partial[..3];
   |                    ^^ no implementation for `&String == str`
   |
   = help: the trait `PartialEq<str>` is not implemented for `&String`
help: consider dereferencing here
   |
LL |     _ = *string_ref == partial[..3];
   |         +

error[E0277]: can't compare `str` with `&String`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:71:22
   |
LL |     _ = partial[..3] == string_ref;
   |                      ^^ no implementation for `str == &String`
   |
   = help: the trait `PartialEq<&String>` is not implemented for `str`
help: consider dereferencing here
   |
LL |     _ = partial[..3] == *string_ref;
   |                         +

error[E0277]: the size for values of type `str` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:78:17
   |
LL |     let _ = FOO & (*"Sized".to_string().into_boxed_str());
   |                 ^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `str`

error: aborting due to 23 previous errors
---
To only update this specific test, also pass `--test-args box/into-boxed-slice-fail.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/box/into-boxed-slice-fail.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/box/into-boxed-slice-fail" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/box/into-boxed-slice-fail.rs:7:35
   |
---
------------------------------------------


---- [ui] tests/ui/const-generics/const-arg-in-const-arg.rs#min stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/const-generics/const-arg-in-const-arg.min/const-arg-in-const-arg.min.stderr`
diff of stderr:

248    |
249    = note: this may fail depending on what value the parameter takes
250 
- error: constant expression depends on a generic parameter
-   --> $DIR/const-arg-in-const-arg.rs:25:13
-    |
- LL |     let _ = [0; foo::<T>()];
-    |             ^^^^^^^^^^^^^^^
-    |
-    = note: this may fail depending on what value the parameter takes
- 
259 error[E0747]: unresolved item provided when a constant was expected
260   --> $DIR/const-arg-in-const-arg.rs:27:23
261    |

361 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
362    |              ^^
363 
- error: aborting due to 37 previous errors
+ error: aborting due to 36 previous errors
365 
---
To only update this specific test, also pass `--test-args const-generics/const-arg-in-const-arg.rs`

error in revision `min`: 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/const-arg-in-const-arg.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" "min" "--check-cfg" "cfg(test,FALSE,min)" "--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/const-arg-in-const-arg.min" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:15:23
   |
LL |     let _: [u8; foo::<T>()]; //[min]~ ERROR generic parameters may not
   |                       ^ cannot perform const operation using `T`
   |
   = note: type parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:16:23
   |
LL |     let _: [u8; bar::<N>()]; //[min]~ ERROR generic parameters may not
   |                       ^ cannot perform const operation using `N`
   |
   = help: const parameters may only be used as standalone arguments here, i.e. `N`
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:18:23
   |
LL |     let _: [u8; faz::<'a>(&())]; //[min]~ ERROR generic parameters may not
   |                       ^^ cannot perform const operation using `'a`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:20:23
   |
LL |     let _: [u8; baz::<'a>(&())]; //[min]~ ERROR generic parameters may not
   |                       ^^ cannot perform const operation using `'a`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:21:23
   |
LL |     let _: [u8; faz::<'b>(&())]; //[min]~ ERROR generic parameters may not
   |                       ^^ cannot perform const operation using `'b`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:23:23
   |
LL |     let _: [u8; baz::<'b>(&())]; //[min]~ ERROR generic parameters may not
   |                       ^^ cannot perform const operation using `'b`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:27:23
   |
LL |     let _ = [0; bar::<N>()]; //[min]~ ERROR generic parameters may not
   |                       ^ cannot perform const operation using `N`
   |
   = help: const parameters may only be used as standalone arguments here, i.e. `N`
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:29:23
   |
LL |     let _ = [0; faz::<'a>(&())]; //[min]~ ERROR generic parameters may not
   |                       ^^ cannot perform const operation using `'a`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:31:23
   |
LL |     let _ = [0; baz::<'a>(&())]; //[min]~ ERROR generic parameters may not
   |                       ^^ cannot perform const operation using `'a`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:32:23
   |
LL |     let _ = [0; faz::<'b>(&())]; //[min]~ ERROR generic parameters may not
   |                       ^^ cannot perform const operation using `'b`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:34:23
   |
LL |     let _ = [0; baz::<'b>(&())]; //[min]~ ERROR generic parameters may not
   |                       ^^ cannot perform const operation using `'b`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:35:24
   |
LL |     let _: Foo<{ foo::<T>() }>; //[min]~ ERROR generic parameters may not
   |                        ^ cannot perform const operation using `T`
   |
   = note: type parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:36:24
   |
LL |     let _: Foo<{ bar::<N>() }>; //[min]~ ERROR generic parameters may not
   |                        ^ cannot perform const operation using `N`
   |
   = help: const parameters may only be used as standalone arguments here, i.e. `N`
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:38:24
   |
LL |     let _: Foo<{ faz::<'a>(&()) }>; //[min]~ ERROR generic parameters may not
   |                        ^^ cannot perform const operation using `'a`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:40:24
   |
LL |     let _: Foo<{ baz::<'a>(&()) }>; //[min]~ ERROR generic parameters may not
   |                        ^^ cannot perform const operation using `'a`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:41:24
   |
LL |     let _: Foo<{ faz::<'b>(&()) }>; //[min]~ ERROR generic parameters may not
   |                        ^^ cannot perform const operation using `'b`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:43:24
   |
LL |     let _: Foo<{ baz::<'b>(&()) }>; //[min]~ ERROR generic parameters may not
   |                        ^^ cannot perform const operation using `'b`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:44:27
   |
LL |     let _ = Foo::<{ foo::<T>() }>; //[min]~ ERROR generic parameters may not
   |                           ^ cannot perform const operation using `T`
   |
   = note: type parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:45:27
   |
LL |     let _ = Foo::<{ bar::<N>() }>; //[min]~ ERROR generic parameters may not
   |                           ^ cannot perform const operation using `N`
   |
   = help: const parameters may only be used as standalone arguments here, i.e. `N`
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:47:27
   |
LL |     let _ = Foo::<{ faz::<'a>(&()) }>; //[min]~ ERROR generic parameters may not
   |                           ^^ cannot perform const operation using `'a`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:49:27
   |
LL |     let _ = Foo::<{ baz::<'a>(&()) }>; //[min]~ ERROR generic parameters may not
   |                           ^^ cannot perform const operation using `'a`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:50:27
   |
LL |     let _ = Foo::<{ faz::<'b>(&()) }>; //[min]~ ERROR generic parameters may not
   |                           ^^ cannot perform const operation using `'b`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:52:27
   |
LL |     let _ = Foo::<{ baz::<'b>(&()) }>; //[min]~ ERROR generic parameters may not
   |                           ^^ cannot perform const operation using `'b`
   |
   = note: lifetime parameters may not be used in const expressions
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error[E0747]: unresolved item provided when a constant was expected
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:16:23
   |
LL |     let _: [u8; bar::<N>()]; //[min]~ ERROR generic parameters may not
   |                       ^
   |
help: if this generic argument was intended as a const parameter, surround it with braces
   |
LL |     let _: [u8; bar::<{ N }>()]; //[min]~ ERROR generic parameters may not
   |                       +   +

error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:18:23
   |
LL |     let _: [u8; faz::<'a>(&())]; //[min]~ ERROR generic parameters may not
   |                       ^^
   |
note: the late bound lifetime parameter is introduced here
  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:10:14
   |
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
   |              ^^

error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:21:23
   |
LL |     let _: [u8; faz::<'b>(&())]; //[min]~ ERROR generic parameters may not
   |                       ^^
   |
note: the late bound lifetime parameter is introduced here
  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:10:14
   |
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
   |              ^^

error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:25:17
   |
LL |     let _ = [0; foo::<T>()]; //[min]~ ERROR constant expression depends on a generic parameter
   |                 ^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

error[E0747]: unresolved item provided when a constant was expected
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:27:23
   |
LL |     let _ = [0; bar::<N>()]; //[min]~ ERROR generic parameters may not
   |                       ^
   |
help: if this generic argument was intended as a const parameter, surround it with braces
   |
LL |     let _ = [0; bar::<{ N }>()]; //[min]~ ERROR generic parameters may not
   |                       +   +

error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:29:23
   |
LL |     let _ = [0; faz::<'a>(&())]; //[min]~ ERROR generic parameters may not
   |                       ^^
   |
note: the late bound lifetime parameter is introduced here
  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:10:14
   |
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
   |              ^^

error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:32:23
   |
LL |     let _ = [0; faz::<'b>(&())]; //[min]~ ERROR generic parameters may not
   |                       ^^
   |
note: the late bound lifetime parameter is introduced here
  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:10:14
   |
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
   |              ^^

error[E0747]: unresolved item provided when a constant was expected
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:36:24
   |
LL |     let _: Foo<{ bar::<N>() }>; //[min]~ ERROR generic parameters may not
   |                        ^
   |
help: if this generic argument was intended as a const parameter, surround it with braces
   |
LL |     let _: Foo<{ bar::<{ N }>() }>; //[min]~ ERROR generic parameters may not
   |                        +   +

error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:38:24
   |
LL |     let _: Foo<{ faz::<'a>(&()) }>; //[min]~ ERROR generic parameters may not
   |                        ^^
   |
note: the late bound lifetime parameter is introduced here
  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:10:14
   |
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
   |              ^^

error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:41:24
   |
LL |     let _: Foo<{ faz::<'b>(&()) }>; //[min]~ ERROR generic parameters may not
   |                        ^^
   |
note: the late bound lifetime parameter is introduced here
  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:10:14
   |
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
   |              ^^

error[E0747]: unresolved item provided when a constant was expected
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:45:27
   |
LL |     let _ = Foo::<{ bar::<N>() }>; //[min]~ ERROR generic parameters may not
   |                           ^
   |
help: if this generic argument was intended as a const parameter, surround it with braces
   |
LL |     let _ = Foo::<{ bar::<{ N }>() }>; //[min]~ ERROR generic parameters may not
   |                           +   +

error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:47:27
   |
LL |     let _ = Foo::<{ faz::<'a>(&()) }>; //[min]~ ERROR generic parameters may not
   |                           ^^
   |
note: the late bound lifetime parameter is introduced here
  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:10:14
   |
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
   |              ^^

error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:50:27
   |
LL |     let _ = Foo::<{ faz::<'b>(&()) }>; //[min]~ ERROR generic parameters may not
   |                           ^^
   |
note: the late bound lifetime parameter is introduced here
  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:10:14
   |
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
   |              ^^

error: aborting due to 36 previous errors

Some errors have detailed explanations: E0747, E0794.
---
8 
- error: constant expression depends on a generic parameter
-   --> $DIR/failing_goal_with_repeat_expr_anon_const.rs:14:47
-    |
- LL |         [0u8; std::mem::size_of::<Self::A>()] == Self::P;
-    |                                               ^^
-    |
-    = note: this may fail depending on what value the parameter takes
- 
17 error[E0277]: can't compare `[u8; std::mem::size_of::<Self::A>()]` with `<Self as T>::A`
18   --> $DIR/failing_goal_with_repeat_expr_anon_const.rs:14:47
19    |

26 LL | pub trait T where [u8; std::mem::size_of::<Self::A>()]: PartialEq<<Self as T>::A> {
27    |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
28 
- error: aborting due to 3 previous errors
+ error: aborting due to 2 previous errors
30 
---
To only update this specific test, also pass `--test-args const-generics/failing_goal_with_repeat_expr_anon_const.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/failing_goal_with_repeat_expr_anon_const.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/failing_goal_with_repeat_expr_anon_const" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/const-generics/failing_goal_with_repeat_expr_anon_const.rs:14:15
   |
LL |         [0u8; std::mem::size_of::<Self::A>()] == Self::P;
   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

error[E0277]: can't compare `[u8; std::mem::size_of::<Self::A>()]` with `<Self as T>::A`
##[error]  --> /checkout/tests/ui/const-generics/failing_goal_with_repeat_expr_anon_const.rs:14:47
   |
LL |         [0u8; std::mem::size_of::<Self::A>()] == Self::P;
   |                                               ^^ no implementation for `[u8; std::mem::size_of::<Self::A>()] == <Self as T>::A`
   |
   = help: the trait `PartialEq<<Self as T>::A>` is not implemented for `[u8; std::mem::size_of::<Self::A>()]`
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
   |
LL | pub trait T where [u8; std::mem::size_of::<Self::A>()]: PartialEq<<Self as T>::A> {
   |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
---
8 
- error: constant expression depends on a generic parameter
-   --> $DIR/generic-parameter-in-const-expression-39211.rs:9:13
-    |
- LL |     let a = [3; M::Row::DIM];
-    |             ^^^^^^^^^^^^^^^^
-    |
-    = note: this may fail depending on what value the parameter takes
- 
- error: aborting due to 2 previous errors
---
To only update this specific test, also pass `--test-args const-generics/generic-parameter-in-const-expression-39211.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/generic-parameter-in-const-expression-39211.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/generic-parameter-in-const-expression-39211" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/const-generics/generic-parameter-in-const-expression-39211.rs:9:17
   |
LL |     let a = [3; M::Row::DIM];
   |                 ^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

error: aborting due to 1 previous error
------------------------------------------


---- [ui] tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151/issue_114151.stderr`
diff of stderr:

58 LL +     }]:
59    |
60 
- error: unconstrained generic constant `L + 1 + L`
-   --> $DIR/issue_114151.rs:17:5
-    |
- LL |     foo::<_, L>([(); L + 1 + L]);
-    |     ^^^^^^^^^^^
- 
- error: unconstrained generic constant `L + 1`
-   --> $DIR/issue_114151.rs:17:5
-    |
- LL |     foo::<_, L>([(); L + 1 + L]);
-    |     ^^^^^^^^^^^
- 
- error: aborting due to 6 previous errors
+ error: aborting due to 4 previous errors
74 
---
To only update this specific test, also pass `--test-args const-generics/generic_const_exprs/const_kind_expr/issue_114151.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/generic_const_exprs/const_kind_expr/issue_114151.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/generic_const_exprs/const_kind_expr/issue_114151" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0107]: function takes 1 generic argument but 2 generic arguments were supplied
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs:17:5
   |
LL |     foo::<_, L>([(); L + 1 + L]);
   |     ^^^    --- help: remove the unnecessary generic argument
   |     |
   |     expected 1 generic argument
   |
note: function defined here, with 1 generic parameter: `N`
---

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs:17:18
   |
LL |     foo::<_, L>([(); L + 1 + L]);
   |                  ^^ expected `u8`, found `()`

error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs:17:22
   |
LL |     foo::<_, L>([(); L + 1 + L]);
   |                      ^^^^^^^^^
   |
help: try adding a `where` bound
   |
LL |     [(); (L - 1) + 1 + L]:, [(); L + 1 + L]:
   |                             ++++++++++++++++

error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs:17:17
   |
LL |     foo::<_, L>([(); L + 1 + L]);
   |     ----------- ^^^^^^^^^^^^^^^
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `foo`
  --> /checkout/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs:5:13
   |
LL |   fn foo<const N: usize>(
   |      --- required by a bound in this function
LL |       _: [u8; {
   |  _____________^
LL | |         {
LL | |             N
LL | |         }
LL | |     }],
   | |_____^ required by this bound in `foo`
help: try adding a `where` bound
   |
LL ~     [(); (L - 1) + 1 + L]:, [(); {
LL +         {
LL +             N
LL +         }
LL +     }]:
   |

error: aborting due to 4 previous errors

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


---- [ui] tests/ui/const-generics/generic_const_exprs/dependence_lint.rs#gce stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/const-generics/generic_const_exprs/dependence_lint.gce/dependence_lint.gce.stderr`
diff of stderr:

9 LL | fn foo<T>() where [(); size_of::<*mut T>()]: {
10    |             ++++++++++++++++++++++++++++++++
11 
- error: unconstrained generic constant
-   --> $DIR/dependence_lint.rs:10:5
-    |
- LL |     [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_exprs`
-    |     ^^^^^^^^^^^^^^^^^^^^^^^^
-    |
- help: try adding a `where` bound
-    |
- LL | fn foo<T>() where [(); size_of::<*mut T>()]: {
-    |             ++++++++++++++++++++++++++++++++
- 
23 error: overly complex generic constant
24   --> $DIR/dependence_lint.rs:18:9
25    |

28    |
29    = help: consider moving this anonymous constant into a `const` function
30 
- error: unconstrained generic constant
-   --> $DIR/dependence_lint.rs:15:12
-    |
- LL |     let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce
-    |            ^^^^^^^^^^^^^^^^^^^^^^^^^
-    |
- help: try adding a `where` bound
-    |
- LL | fn foo<T>() where [(); size_of::<*mut T>()]: {
-    |             ++++++++++++++++++++++++++++++++
- 
42 error: overly complex generic constant
43   --> $DIR/dependence_lint.rs:22:17
44    |
---
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/generic_const_exprs/dependence_lint.rs`

error in revision `gce`: 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/generic_const_exprs/dependence_lint.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" "gce" "--check-cfg" "cfg(test,FALSE,full,gce)" "--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/generic_const_exprs/dependence_lint.gce" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zdeduplicate-diagnostics=yes"
stdout: none
--- stderr -------------------------------
error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs:10:9
   |
LL |     [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_exprs`
   |         ^^^^^^^^^^^^^^^^^^^
   |
help: try adding a `where` bound
   |
LL | fn foo<T>() where [(); size_of::<*mut T>()]: {
   |             ++++++++++++++++++++++++++++++++

error: overly complex generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs:18:9
   |
LL |     [0; if false { size_of::<T>() } else { 3 }]; // lint on stable, error with gce
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants
   |
   = help: consider moving this anonymous constant into a `const` function

error: overly complex generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs:22:17
   |
LL |     let _: [u8; if true { size_of::<T>() } else { 3 }]; // error on stable, error with gce
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants
   |
   = help: consider moving this anonymous constant into a `const` function

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


---- [ui] tests/ui/const-generics/generic_const_exprs/no_where_clause.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/const-generics/generic_const_exprs/no_where_clause/no_where_clause.stderr`
diff of stderr:

20 LL |   pub fn new() -> Self where [(); complex_maths(N)]: {
21    |                        +++++++++++++++++++++++++++++
22 
- error: unconstrained generic constant
-   --> $DIR/no_where_clause.rs:18:15
-    |
- LL |       b: [0.; complex_maths(N)],
-    |               ^^^^^^^^^^^^^^^^
-    |
- help: try adding a `where` bound
-    |
- LL |   pub fn new() -> Self where [(); complex_maths(N)]: {
-    |                        +++++++++++++++++++++++++++++
- 
- error: aborting due to 3 previous errors
+ error: aborting due to 2 previous errors
35 
---
To only update this specific test, also pass `--test-args const-generics/generic_const_exprs/no_where_clause.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/generic_const_exprs/no_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" "--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/generic_const_exprs/no_where_clause" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/no_where_clause.rs:10:6
   |
LL |   b: [f32; complex_maths(N)],
   |      ^^^^^^^^^^^^^^^^^^^^^^^
   |
help: try adding a `where` bound
   |
LL | pub struct Example<const N: usize> where [(); complex_maths(N)]: {
   |                                    +++++++++++++++++++++++++++++

error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/no_where_clause.rs:18:10
   |
LL |       b: [0.; complex_maths(N)],
   |          ^^^^^^^^^^^^^^^^^^^^^^
   |
help: try adding a `where` bound
   |
LL |   pub fn new() -> Self where [(); complex_maths(N)]: {
   |                        +++++++++++++++++++++++++++++

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

---
8 
9 error: constant expression depends on a generic parameter
-   --> $DIR/sneaky-array-repeat-expr.rs:11:15
-    |
- LL |     let bar = [(); <()>::Assoc];
-    |               ^^^^^^^^^^^^^^^^^
-    |
-    = note: this may fail depending on what value the parameter takes
- 
- error: constant expression depends on a generic parameter
18   --> $DIR/sneaky-array-repeat-expr.rs:26:21
19    |
20 LL |     let bar2 = [(); <()>::Assoc2];

22    |
23    = note: this may fail depending on what value the parameter takes
24 
- error: constant expression depends on a generic parameter
-   --> $DIR/sneaky-array-repeat-expr.rs:26:16
-    |
- LL |     let bar2 = [(); <()>::Assoc2];
-    |                ^^^^^^^^^^^^^^^^^^
-    |
-    = note: this may fail depending on what value the parameter takes
- 
- error: aborting due to 4 previous errors
---
To only update this specific test, also pass `--test-args const-generics/sneaky-array-repeat-expr.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/sneaky-array-repeat-expr.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/sneaky-array-repeat-expr" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/const-generics/sneaky-array-repeat-expr.rs:11:20
   |
LL |     let bar = [(); <()>::Assoc];
   |                    ^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/const-generics/sneaky-array-repeat-expr.rs:26:21
   |
LL |     let bar2 = [(); <()>::Assoc2];
   |                     ^^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

error: aborting due to 2 previous errors
---
8 
- error: constant expression depends on a generic parameter
-   --> $DIR/issue-50439.rs:25:17
-    |
- LL |         let _ = [(); 0 - !!(<Bears<T> as ReflectDrop>::REFLECT_DROP) as usize];
-    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    |
-    = note: this may fail depending on what value the parameter takes
- 
- error: aborting due to 2 previous errors
---
To only update this specific test, also pass `--test-args consts/issue-50439.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/consts/issue-50439.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/consts/issue-50439" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/consts/issue-50439.rs:25:22
   |
LL |         let _ = [(); 0 - !!(<Bears<T> as ReflectDrop>::REFLECT_DROP) as usize];
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

error: aborting due to 1 previous error
---
8 
- error: constant expression depends on a generic parameter
-   --> $DIR/too_generic_eval_ice.rs:11:9
-    |
- LL |         [5; Self::HOST_SIZE] == [6; 0]
-    |         ^^^^^^^^^^^^^^^^^^^^
-    |
-    = note: this may fail depending on what value the parameter takes
- 
- error: constant expression depends on a generic parameter
-   --> $DIR/too_generic_eval_ice.rs:11:30
-    |
- LL |         [5; Self::HOST_SIZE] == [6; 0]
-    |                              ^^
-    |
-    = note: this may fail depending on what value the parameter takes
- 
25 error[E0277]: can't compare `[{integer}; Self::HOST_SIZE]` with `[{integer}; 0]`
26   --> $DIR/too_generic_eval_ice.rs:11:30
27    |

40              `&mut [T]` implements `PartialEq<[U; N]>`
41            and 11 others
42 
- error: aborting due to 4 previous errors
+ error: aborting due to 2 previous errors
44 
---
To only update this specific test, also pass `--test-args consts/too_generic_eval_ice.rs`

error in revision `current`: 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/consts/too_generic_eval_ice.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" "current" "--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/consts/too_generic_eval_ice.current" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/consts/too_generic_eval_ice.rs:11:13
   |
LL |         [5; Self::HOST_SIZE] == [6; 0]
   |             ^^^^^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

error[E0277]: can't compare `[{integer}; Self::HOST_SIZE]` with `[{integer}; 0]`
##[error]  --> /checkout/tests/ui/consts/too_generic_eval_ice.rs:11:30
   |
LL |         [5; Self::HOST_SIZE] == [6; 0]
   |                              ^^ no implementation for `[{integer}; Self::HOST_SIZE] == [{integer}; 0]`
   |
   = help: the trait `PartialEq<[{integer}; 0]>` is not implemented for `[{integer}; Self::HOST_SIZE]`
   = help: the following other types implement trait `PartialEq<Rhs>`:
             `&[T]` implements `PartialEq<Vec<U, A>>`
             `&[T]` implements `PartialEq<[U; N]>`
             `&[u8; N]` implements `PartialEq<ByteStr>`
             `&[u8; N]` implements `PartialEq<ByteString>`
             `&[u8]` implements `PartialEq<ByteStr>`
             `&[u8]` implements `PartialEq<ByteString>`
             `&mut [T]` implements `PartialEq<Vec<U, A>>`
             `&mut [T]` implements `PartialEq<[U; N]>`
           and 11 others

error: aborting due to 2 previous errors

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


---- [ui] tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455/issue-85455.stderr`
diff of stderr:

9 LL | fn give_me_ice<T: for<'a> SomeTrait<'a>>() {
10    |                 +++++++++++++++++++++++
11 
- error[E0277]: the trait bound `for<'a> T: SomeTrait<'a>` is not satisfied
-   --> $DIR/issue-85455.rs:8:5
-    |
- LL |     callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
-    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> SomeTrait<'a>` is not implemented for `T`
-    |
- help: consider restricting type parameter `T` with trait `SomeTrait`
-    |
- LL | fn give_me_ice<T: for<'a> SomeTrait<'a>>() {
-    |                 +++++++++++++++++++++++
- 
- error: aborting due to 2 previous errors
+ error: aborting due to 1 previous error
24 
---
To only update this specific test, also pass `--test-args higher-ranked/trait-bounds/normalize-under-binder/issue-85455.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/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.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/higher-ranked/trait-bounds/normalize-under-binder/issue-85455" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `for<'a> T: SomeTrait<'a>` is not satisfied
##[error]  --> /checkout/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.rs:8:14
   |
LL |     callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> SomeTrait<'a>` is not implemented for `T`
   |
help: consider restricting type parameter `T` with trait `SomeTrait`
   |
LL | fn give_me_ice<T: for<'a> SomeTrait<'a>>() {
   |                 +++++++++++++++++++++++

error: aborting due to 1 previous error

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


---- [ui] tests/ui/impl-trait/issues/issue-55872-1.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/impl-trait/issues/issue-55872-1/issue-55872-1.stderr`
diff of stderr:

22 LL | impl<S: Default + std::marker::Copy> Bar for S {
23    |                 +++++++++++++++++++
24 
- error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
-   --> $DIR/issue-55872-1.rs:12:29
-    |
- LL |     fn foo<T: Default>() -> Self::E {
-    |                             ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`
- ...
- LL |         (S::default(), T::default())
-    |         ---------------------------- return type was inferred to be `(S, T)` here
-    |
-    = note: required because it appears within the type `(S, T)`
- help: consider further restricting type parameter `T` with trait `Copy`
-    |
- LL |     fn foo<T: Default + std::marker::Copy>() -> Self::E {
-    |                       +++++++++++++++++++
- 
40 error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
---
To only update this specific test, also pass `--test-args impl-trait/issues/issue-55872-1.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/impl-trait/issues/issue-55872-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" "--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/impl-trait/issues/issue-55872-1" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0276]: impl has stricter requirements than trait
##[error]  --> /checkout/tests/ui/impl-trait/issues/issue-55872-1.rs:12:15
   |
LL |     fn foo<T>() -> Self::E;
   |     ----------------------- definition of `foo` from trait
...
LL |     fn foo<T: Default>() -> Self::E {
   |               ^^^^^^^ impl has extra requirement `T: Default`

error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
##[error]  --> /checkout/tests/ui/impl-trait/issues/issue-55872-1.rs:12:29
   |
LL |     fn foo<T: Default>() -> Self::E {
   |                             ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`
...
LL |         (S::default(), T::default())
   |         ---------------------------- return type was inferred to be `(S, T)` here
   |
   = note: required because it appears within the type `(S, T)`
help: consider further restricting type parameter `S` with trait `Copy`
   |
LL | impl<S: Default + std::marker::Copy> Bar for S {
   |                 +++++++++++++++++++

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
##[error]  --> /checkout/tests/ui/impl-trait/issues/issue-55872-1.rs:12:29
   |
---
To only update this specific test, also pass `--test-args iterators/issue-28098.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/iterators/issue-28098.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/iterators/issue-28098" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: `()` is not an iterator
##[error]  --> /checkout/tests/ui/iterators/issue-28098.rs:2:28
   |
---

24 LL | async fn call_async_once(f: impl AsyncFnOnce()) {
25    |                                  ^^^^^^^^^^^^^ required by this bound in `call_async_once`
26 
- error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied
-   --> $DIR/iter-macro-not-async-closure.rs:25:13
-    |
- LL |     let x = pin!(call_async_once(f));
-    |             ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}`
-    |
- note: required by a bound in `call_async_once`
-   --> $DIR/iter-macro-not-async-closure.rs:14:34
-    |
- LL | async fn call_async_once(f: impl AsyncFnOnce()) {
-    |                                  ^^^^^^^^^^^^^ required by this bound in `call_async_once`
-    = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
- 
- error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied
-   --> $DIR/iter-macro-not-async-closure.rs:25:13
-    |
- LL |     let x = pin!(call_async_once(f));
-    |             ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}`
-    |
- note: required by a bound in `call_async_once`
-   --> $DIR/iter-macro-not-async-closure.rs:14:34
-    |
- LL | async fn call_async_once(f: impl AsyncFnOnce()) {
-    |                                  ^^^^^^^^^^^^^ required by this bound in `call_async_once`
-    = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
- 
- error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied
-   --> $DIR/iter-macro-not-async-closure.rs:30:5
-    |
- LL |     x.poll(&mut Context::from_waker(Waker::noop()));
-    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}`
-    |
- note: required by a bound in `call_async_once`
-   --> $DIR/iter-macro-not-async-closure.rs:14:34
-    |
- LL | async fn call_async_once(f: impl AsyncFnOnce()) {
---
To only update this specific test, also pass `--test-args iterators/iter-macro-not-async-closure.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/iterators/iter-macro-not-async-closure.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" "--remap-path-prefix=/checkout/tests/ui=fake-test-src-base" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/iterators/iter-macro-not-async-closure" "-A" "unused" "-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=2024"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `{gen closure@fake-test-src-base/iterators/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied
##[error]  --> fake-test-src-base/iterators/iter-macro-not-async-closure.rs:25:34
   |
LL |     let x = pin!(call_async_once(f));
   |                  --------------- ^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@fake-test-src-base/iterators/iter-macro-not-async-closure.rs:19:21: 19:28}`
   |                  |
   |                  required by a bound introduced by this call
   |
note: required by a bound in `call_async_once`
  --> fake-test-src-base/iterators/iter-macro-not-async-closure.rs:14:34
   |
LL | async fn call_async_once(f: impl AsyncFnOnce()) {
   |                                  ^^^^^^^^^^^^^ required by this bound in `call_async_once`

error[E0277]: the trait bound `{gen closure@fake-test-src-base/iterators/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied
##[error]  --> fake-test-src-base/iterators/iter-macro-not-async-closure.rs:25:18
   |
LL |     let x = pin!(call_async_once(f));
   |                  ^^^^^^^^^^^^^^^^^^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@fake-test-src-base/iterators/iter-macro-not-async-closure.rs:19:21: 19:28}`
   |
note: required by a bound in `call_async_once`
  --> fake-test-src-base/iterators/iter-macro-not-async-closure.rs:14:34
   |
LL | async fn call_async_once(f: impl AsyncFnOnce()) {
---
diff of stderr:

69   --> $DIR/binops.rs:6:7
70    |
71 LL |     5 < String::new();
-    |       ^ no implementation for `{integer} < String` and `{integer} > String`
+    |       ^ no implementation for `{integer} == String`
73    |
-    = help: the trait `PartialOrd<String>` is not implemented for `{integer}`
-    = help: the following other types implement trait `PartialOrd<Rhs>`:
+    = help: the trait `PartialEq<String>` is not implemented for `{integer}`
+    = help: the following other types implement trait `PartialEq<Rhs>`:
76              f128
77              f16
78              f32


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 mismatched_types/binops.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/mismatched_types/binops.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/mismatched_types/binops" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: cannot add `Option<{integer}>` to `{integer}`
##[error]  --> /checkout/tests/ui/mismatched_types/binops.rs:2:7
   |
LL |     1 + Some(1); //~ ERROR cannot add `Option<{integer}>` to `{integer}`
   |       ^ no implementation for `{integer} + Option<{integer}>`
   |
   = help: the trait `Add<Option<{integer}>>` is not implemented for `{integer}`
   = help: the following other types implement trait `Add<Rhs>`:
             `&f128` implements `Add<f128>`
             `&f128` implements `Add`
             `&f16` implements `Add<f16>`
             `&f16` implements `Add`
             `&f32` implements `Add<f32>`
             `&f32` implements `Add`
             `&f64` implements `Add<f64>`
             `&f64` implements `Add`
           and 56 others

error[E0277]: cannot subtract `Option<{integer}>` from `usize`
##[error]  --> /checkout/tests/ui/mismatched_types/binops.rs:3:16
   |
LL |     2 as usize - Some(1); //~ ERROR cannot subtract `Option<{integer}>` from `usize`
   |                ^ no implementation for `usize - Option<{integer}>`
   |
   = help: the trait `Sub<Option<{integer}>>` is not implemented for `usize`
   = help: the following other types implement trait `Sub<Rhs>`:
             `&usize` implements `Sub<usize>`
             `&usize` implements `Sub`
             `usize` implements `Sub<&usize>`
             `usize` implements `Sub`

error[E0277]: cannot multiply `{integer}` by `()`
##[error]  --> /checkout/tests/ui/mismatched_types/binops.rs:4:7
   |
LL |     3 * (); //~ ERROR cannot multiply `{integer}` by `()`
   |       ^ no implementation for `{integer} * ()`
   |
   = help: the trait `Mul<()>` is not implemented for `{integer}`
   = help: the following other types implement trait `Mul<Rhs>`:
             `&f128` implements `Mul<f128>`
             `&f128` implements `Mul`
             `&f16` implements `Mul<f16>`
             `&f16` implements `Mul`
             `&f32` implements `Mul<f32>`
             `&f32` implements `Mul`
             `&f64` implements `Mul<f64>`
             `&f64` implements `Mul`
           and 57 others

error[E0277]: cannot divide `{integer}` by `&str`
##[error]  --> /checkout/tests/ui/mismatched_types/binops.rs:5:7
   |
LL |     4 / ""; //~ ERROR cannot divide `{integer}` by `&str`
   |       ^ no implementation for `{integer} / &str`
   |
   = help: the trait `Div<&str>` is not implemented for `{integer}`
   = help: the following other types implement trait `Div<Rhs>`:
             `&f128` implements `Div<f128>`
             `&f128` implements `Div`
             `&f16` implements `Div<f16>`
             `&f16` implements `Div`
             `&f32` implements `Div<f32>`
             `&f32` implements `Div`
             `&f64` implements `Div<f64>`
             `&f64` implements `Div`
           and 62 others

error[E0277]: can't compare `{integer}` with `String`
##[error]  --> /checkout/tests/ui/mismatched_types/binops.rs:6:7
   |
LL |     5 < String::new(); //~ ERROR can't compare `{integer}` with `String`
   |       ^ no implementation for `{integer} == String`
   |
   = help: the trait `PartialEq<String>` is not implemented for `{integer}`
   = help: the following other types implement trait `PartialEq<Rhs>`:
             f128
             f16
             f32
             f64
             i128
             i16
             i32
             i64
           and 8 others

error[E0277]: can't compare `{integer}` with `Result<{integer}, _>`
##[error]  --> /checkout/tests/ui/mismatched_types/binops.rs:7:7
   |
LL |     6 == Ok(1); //~ ERROR can't compare `{integer}` with `Result<{integer}, _>`
   |       ^^ no implementation for `{integer} == Result<{integer}, _>`
   |
   = help: the trait `PartialEq<Result<{integer}, _>>` is not implemented for `{integer}`
   = help: the following other types implement trait `PartialEq<Rhs>`:
             f128
             f16
             f32
             f64
             i128
---

7    = help: the trait `Sized` is not implemented for `[u8]`
8    = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
9 
- error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
-   --> $DIR/offset-of-dst-field.rs:38:5
-    |
- LL |     offset_of!(Beta, z);
-    |     ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `(dyn Trait + 'static)`
-    = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
- 
19 error[E0277]: the size for values of type `Extern` cannot be known at compilation time
-   --> $DIR/offset-of-dst-field.rs:39:5
-    |
- LL |     offset_of!(Gamma, z);
-    |     ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `Extern`
-    = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
- 
- error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
-   --> $DIR/offset-of-dst-field.rs:41:5
-    |
- LL |     offset_of!((u8, dyn Trait), 1);
-    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `dyn Trait`
-    = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
- 
- error[E0277]: the size for values of type `Extern` cannot be known at compilation time
38   --> $DIR/offset-of-dst-field.rs:46:5
39    |
40 LL |     offset_of!(Delta<Extern>, z);

43    = help: the trait `Sized` is not implemented for `Extern`
44    = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
45 
- error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
-   --> $DIR/offset-of-dst-field.rs:47:5
-    |
- LL |     offset_of!(Delta<dyn Trait>, z);
-    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `dyn Trait`
-    = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
- 
---
To only update this specific test, also pass `--test-args offset-of/offset-of-dst-field.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/offset-of/offset-of-dst-field.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/offset-of/offset-of-dst-field" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/offset-of/offset-of-dst-field.rs:37:5
   |
LL |     offset_of!(Alpha, z); //~ ERROR the size for values of type
   |     ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u8]`
   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the size for values of type `Extern` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/offset-of/offset-of-dst-field.rs:46:5
   |
LL |     offset_of!(Delta<Extern>, z); //~ ERROR the size for values of type
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `Extern`
   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/offset-of/offset-of-dst-field.rs:45:5
   |
LL |     offset_of!(Delta<Alpha>, z); //~ ERROR the size for values of type
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `Alpha`, the trait `Sized` is not implemented for `[u8]`
note: required because it appears within the type `Alpha`
  --> /checkout/tests/ui/offset-of/offset-of-dst-field.rs:6:8
   |
LL | struct Alpha {
   |        ^^^^^
   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the size for values of type `T` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/offset-of/offset-of-dst-field.rs:51:5
   |
LL | fn generic_with_maybe_sized<T: ?Sized>() -> usize {
   |                             - this type parameter needs to be `Sized`
LL |     offset_of!(Delta<T>, z) //~ ERROR the size for values of type
   |     ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn generic_with_maybe_sized<T: ?Sized>() -> usize {
LL + fn generic_with_maybe_sized<T>() -> usize {
   |

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/offset-of/offset-of-dst-field.rs:55:16
   |
LL |     offset_of!(([u8], u8), 1); //~ ERROR the size for values of type
   |                ^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u8]`
   = note: only the last element of a tuple may have a dynamically sized type

---

15    |
16    = note: this error originates in the macro `deref` (in Nightly builds, run with -Z macro-backtrace for more info)
17 
- error[E0277]: the trait bound `Rc<({integer},)>: DerefMut` is not satisfied
-   --> $DIR/ref-mut.rs:22:9
-    |
- LL |         (x,) => {}
-    |         ^^^^ the trait `DerefMut` is not implemented for `Rc<({integer},)>`
- 
- error: aborting due to 2 previous errors; 1 warning emitted
+ error: aborting due to 1 previous error; 1 warning emitted
25 
26 For more information about this error, try `rustc --explain E0277`.
---
To only update this specific test, also pass `--test-args pattern/deref-patterns/ref-mut.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/pattern/deref-patterns/ref-mut.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/pattern/deref-patterns/ref-mut" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
warning: the feature `deref_patterns` is incomplete and may not be safe to use and/or cause compiler crashes
##[warning]  --> /checkout/tests/ui/pattern/deref-patterns/ref-mut.rs:1:12
   |
LL | #![feature(deref_patterns)]
   |            ^^^^^^^^^^^^^^
   |
   = note: see issue #87121 <https://github.com/rust-lang/rust/issues/87121> for more information
   = note: `#[warn(incomplete_features)]` on by default

error[E0277]: the trait bound `Rc<{integer}>: DerefMut` is not satisfied
##[error]  --> /checkout/tests/ui/pattern/deref-patterns/ref-mut.rs:17:9
   |
LL |         deref!(x) => {}
   |         ^^^^^^^^^ the trait `DerefMut` is not implemented for `Rc<{integer}>`
   |
---

88    = note: expected struct `Foo`
89               found struct `Rc<Foo>`
90 
- error[E0271]: type mismatch resolving `<Silly as FindReceiver>::Receiver == &Foo`
-   --> $DIR/arbitrary-self-from-method-substs.rs:96:9
-    |
- LL |     foo.get6(Silly);
-    |         ^^^^ type mismatch resolving `<Silly as FindReceiver>::Receiver == &Foo`
-    |
- note: expected this to be `&Foo`
-   --> $DIR/arbitrary-self-from-method-substs.rs:71:21
-    |
- LL |     type Receiver = std::rc::Rc<Foo>;
-    |                     ^^^^^^^^^^^^^^^^
-    = note: expected reference `&Foo`
-                  found struct `Rc<Foo>`
- 
105 error[E0599]: the method `get` exists for struct `Rc<Bar<_>>`, but its trait bounds were not satisfied
106   --> $DIR/arbitrary-self-from-method-substs.rs:100:7
107    |

162    = note: the following trait defines an item `get`, perhaps you need to implement it:
163            candidate #1: `SliceIndex`
---
To only update this specific test, also pass `--test-args self/arbitrary-self-from-method-substs.rs`

error in revision `default`: 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/self/arbitrary-self-from-method-substs.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" "default" "--check-cfg" "cfg(test,FALSE,default,feature)" "--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/self/arbitrary-self-from-method-substs.default" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0801]: invalid generic `self` parameter type: `R`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:9:43
   |
LL |     fn get<R: Deref<Target = Self>>(self: R) -> u32 {
   |                                           ^
   |
   = note: type of `self` must not be a method generic parameter type
   = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)

error[E0801]: invalid generic `self` parameter type: `&R`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:13:44
   |
LL |     fn get1<R: Deref<Target = Self>>(self: &R) -> u32 {
   |                                            ^^
   |
   = note: type of `self` must not be a method generic parameter type
   = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)

error[E0801]: invalid generic `self` parameter type: `&mut R`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:17:44
   |
LL |     fn get2<R: Deref<Target = Self>>(self: &mut R) -> u32 {
   |                                            ^^^^^^
   |
   = note: type of `self` must not be a method generic parameter type
   = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)

error[E0801]: invalid generic `self` parameter type: `Rc<R>`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:21:44
   |
LL |     fn get3<R: Deref<Target = Self>>(self: std::rc::Rc<R>) -> u32 {
   |                                            ^^^^^^^^^^^^^^
   |
   = note: type of `self` must not be a method generic parameter type
   = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)

error[E0801]: invalid generic `self` parameter type: `&Rc<R>`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:25:44
   |
LL |     fn get4<R: Deref<Target = Self>>(self: &std::rc::Rc<R>) -> u32 {
   |                                            ^^^^^^^^^^^^^^^
   |
   = note: type of `self` must not be a method generic parameter type
   = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)

error[E0801]: invalid generic `self` parameter type: `Rc<&R>`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:29:44
   |
LL |     fn get5<R: Deref<Target = Self>>(self: std::rc::Rc<&R>) -> u32 {
   |                                            ^^^^^^^^^^^^^^^
   |
   = note: type of `self` must not be a method generic parameter type
   = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)

error[E0658]: `<FR as FindReceiver>::Receiver` cannot be used as the type of `self` without the `arbitrary_self_types` feature
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:33:37
   |
LL |     fn get6<FR: FindReceiver>(self: FR::Receiver, other: FR) -> u32 {
   |                                     ^^^^^^^^^^^^
   |
   = note: see issue #44874 <https://github.com/rust-lang/rust/issues/44874> for more information
   = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: consider changing to `self`, `&self`, `&mut self`, or a type implementing `Receiver` such as `self: Box<Self>`, `self: Rc<Self>`, or `self: Arc<Self>`

error[E0658]: `R` cannot be used as the type of `self` without the `arbitrary_self_types` feature
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:61:18
   |
LL |     fn get(self: R) {}
   |                  ^
   |
   = note: see issue #44874 <https://github.com/rust-lang/rust/issues/44874> for more information
   = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: consider changing to `self`, `&self`, `&mut self`, or a type implementing `Receiver` such as `self: Box<Self>`, `self: Rc<Self>`, or `self: Arc<Self>`

error[E0271]: type mismatch resolving `<Silly as FindReceiver>::Receiver == Foo`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:92:9
   |
LL |     foo.get6(Silly);
   |         ^^^^ type mismatch resolving `<Silly as FindReceiver>::Receiver == Foo`
   |
note: expected this to be `Foo`
  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:71:21
   |
LL |     type Receiver = std::rc::Rc<Foo>;
   |                     ^^^^^^^^^^^^^^^^
   = note: expected struct `Foo`
              found struct `Rc<Foo>`

error[E0599]: the method `get` exists for struct `Rc<Bar<_>>`, but its trait bounds were not satisfied
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:100:7
   |
LL | struct Bar<R>(std::marker::PhantomData<R>);
   | ------------- doesn't satisfy `Bar<_>: Deref`
...
LL |     t.get();
   |       ^^^ method cannot be called on `Rc<Bar<_>>` due to unsatisfied trait bounds
   |
note: the following trait bounds were not satisfied:
      `<&Bar<_> as Deref>::Target = Bar<&Bar<_>>`
      `<&Rc<Bar<_>> as Deref>::Target = Bar<&Rc<Bar<_>>>`
      `<&mut Bar<_> as Deref>::Target = Bar<&mut Bar<_>>`
      `<&mut Rc<Bar<_>> as Deref>::Target = Bar<&mut Rc<Bar<_>>>`
      `<Rc<Bar<_>> as Deref>::Target = Bar<Rc<Bar<_>>>`
      `Bar<_>: Deref`
  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:60:9
   |
LL | impl<R: std::ops::Deref<Target = Self>> Bar<R> {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ------
   |         |               |
   |         |               unsatisfied trait bound introduced here
   |         unsatisfied trait bound introduced here
note: the trait `Deref` must be implemented
  --> /rustc/FAKE_PREFIX/library/core/src/ops/deref.rs:140:1
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `get`, perhaps you need to implement it:
           candidate #1: `SliceIndex`

error[E0599]: the method `get` exists for reference `&Rc<Bar<_>>`, but its trait bounds were not satisfied
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:108:7
   |
LL | struct Bar<R>(std::marker::PhantomData<R>);
   | ------------- doesn't satisfy `Bar<_>: Deref`
...
LL |     t.get();
   |       ^^^ method cannot be called on `&Rc<Bar<_>>` due to unsatisfied trait bounds
   |
note: the following trait bounds were not satisfied:
      `<&&Rc<Bar<_>> as Deref>::Target = Bar<&&Rc<Bar<_>>>`
      `<&Bar<_> as Deref>::Target = Bar<&Bar<_>>`
      `<&Rc<Bar<_>> as Deref>::Target = Bar<&Rc<Bar<_>>>`
      `<&mut &Rc<Bar<_>> as Deref>::Target = Bar<&mut &Rc<Bar<_>>>`
      `<&mut Bar<_> as Deref>::Target = Bar<&mut Bar<_>>`
      `<&mut Rc<Bar<_>> as Deref>::Target = Bar<&mut Rc<Bar<_>>>`
      `<Rc<Bar<_>> as Deref>::Target = Bar<Rc<Bar<_>>>`
      `Bar<_>: Deref`
  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:60:9
   |
LL | impl<R: std::ops::Deref<Target = Self>> Bar<R> {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ------
   |         |               |
   |         |               unsatisfied trait bound introduced here
   |         unsatisfied trait bound introduced here
note: the trait `Deref` must be implemented
---

99    = note: expected struct `Foo`
100               found struct `Rc<Foo>`
101 
- error[E0271]: type mismatch resolving `<Silly as FindReceiver>::Receiver == &Foo`
-   --> $DIR/arbitrary-self-from-method-substs.rs:96:9
-    |
- LL |     foo.get6(Silly);
-    |         ^^^^ type mismatch resolving `<Silly as FindReceiver>::Receiver == &Foo`
-    |
- note: expected this to be `&Foo`
-   --> $DIR/arbitrary-self-from-method-substs.rs:71:21
-    |
- LL |     type Receiver = std::rc::Rc<Foo>;
-    |                     ^^^^^^^^^^^^^^^^
-    = note: expected reference `&Foo`
-                  found struct `Rc<Foo>`
- 
116 error[E0599]: the method `get` exists for struct `Rc<Bar<_>>`, but its trait bounds were not satisfied
117   --> $DIR/arbitrary-self-from-method-substs.rs:100:7
118    |

173    = note: the following trait defines an item `get`, perhaps you need to implement it:
174            candidate #1: `SliceIndex`
---
To only update this specific test, also pass `--test-args self/arbitrary-self-from-method-substs.rs`

error in revision `feature`: 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/self/arbitrary-self-from-method-substs.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" "feature" "--check-cfg" "cfg(test,FALSE,default,feature)" "--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/self/arbitrary-self-from-method-substs.feature" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0801]: invalid generic `self` parameter type: `R`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:9:43
   |
LL |     fn get<R: Deref<Target = Self>>(self: R) -> u32 {
   |                                           ^
   |
   = note: type of `self` must not be a method generic parameter type
   = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)

error[E0801]: invalid generic `self` parameter type: `&R`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:13:44
   |
LL |     fn get1<R: Deref<Target = Self>>(self: &R) -> u32 {
   |                                            ^^
   |
   = note: type of `self` must not be a method generic parameter type
   = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)

error[E0801]: invalid generic `self` parameter type: `&mut R`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:17:44
   |
LL |     fn get2<R: Deref<Target = Self>>(self: &mut R) -> u32 {
   |                                            ^^^^^^
   |
   = note: type of `self` must not be a method generic parameter type
   = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)

error[E0801]: invalid generic `self` parameter type: `Rc<R>`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:21:44
   |
LL |     fn get3<R: Deref<Target = Self>>(self: std::rc::Rc<R>) -> u32 {
   |                                            ^^^^^^^^^^^^^^
   |
   = note: type of `self` must not be a method generic parameter type
   = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)

error[E0801]: invalid generic `self` parameter type: `&Rc<R>`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:25:44
   |
LL |     fn get4<R: Deref<Target = Self>>(self: &std::rc::Rc<R>) -> u32 {
   |                                            ^^^^^^^^^^^^^^^
   |
   = note: type of `self` must not be a method generic parameter type
   = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)

error[E0801]: invalid generic `self` parameter type: `Rc<&R>`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:29:44
   |
LL |     fn get5<R: Deref<Target = Self>>(self: std::rc::Rc<&R>) -> u32 {
   |                                            ^^^^^^^^^^^^^^^
   |
   = note: type of `self` must not be a method generic parameter type
   = help: use a concrete type such as `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:76:5
   |
LL |     foo.get::<&Foo>();
   |     ^^^ expected `&Foo`, found `Foo`

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:78:5
   |
LL |     foo.get::<std::rc::Rc<Foo>>();
   |     ^^^ expected `Rc<Foo>`, found `Foo`
   |
   = note: expected struct `Rc<Foo>`
              found struct `Foo`

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:84:5
   |
LL |     smart_ptr.get::<SmartPtr2<Foo>>();
   |     ^^^^^^^^^ expected `SmartPtr2<'_, Foo>`, found `SmartPtr<'_, Foo>`
   |
   = note: expected struct `SmartPtr2<'_, Foo>`
              found struct `SmartPtr<'_, Foo>`

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:86:5
   |
LL |     smart_ptr.get::<&Foo>();
   |     ^^^^^^^^^ expected `&Foo`, found `SmartPtr<'_, Foo>`
   |
   = note: expected reference `&Foo`
                 found struct `SmartPtr<'_, Foo>`

error[E0271]: type mismatch resolving `<Silly as FindReceiver>::Receiver == Foo`
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:92:9
   |
LL |     foo.get6(Silly);
   |         ^^^^ type mismatch resolving `<Silly as FindReceiver>::Receiver == Foo`
   |
note: expected this to be `Foo`
  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:71:21
   |
LL |     type Receiver = std::rc::Rc<Foo>;
   |                     ^^^^^^^^^^^^^^^^
   = note: expected struct `Foo`
              found struct `Rc<Foo>`

error[E0599]: the method `get` exists for struct `Rc<Bar<_>>`, but its trait bounds were not satisfied
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:100:7
   |
LL | struct Bar<R>(std::marker::PhantomData<R>);
   | ------------- doesn't satisfy `Bar<_>: Deref`
...
LL |     t.get();
   |       ^^^ method cannot be called on `Rc<Bar<_>>` due to unsatisfied trait bounds
   |
note: the following trait bounds were not satisfied:
      `<&Bar<_> as Deref>::Target = Bar<&Bar<_>>`
      `<&Rc<Bar<_>> as Deref>::Target = Bar<&Rc<Bar<_>>>`
      `<&mut Bar<_> as Deref>::Target = Bar<&mut Bar<_>>`
      `<&mut Rc<Bar<_>> as Deref>::Target = Bar<&mut Rc<Bar<_>>>`
      `<Rc<Bar<_>> as Deref>::Target = Bar<Rc<Bar<_>>>`
      `Bar<_>: Deref`
  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:60:9
   |
LL | impl<R: std::ops::Deref<Target = Self>> Bar<R> {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ------
   |         |               |
   |         |               unsatisfied trait bound introduced here
   |         unsatisfied trait bound introduced here
note: the trait `Deref` must be implemented
  --> /rustc/FAKE_PREFIX/library/core/src/ops/deref.rs:140:1
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `get`, perhaps you need to implement it:
           candidate #1: `SliceIndex`

error[E0599]: the method `get` exists for reference `&Rc<Bar<_>>`, but its trait bounds were not satisfied
##[error]  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:108:7
   |
LL | struct Bar<R>(std::marker::PhantomData<R>);
   | ------------- doesn't satisfy `Bar<_>: Deref`
...
LL |     t.get();
   |       ^^^ method cannot be called on `&Rc<Bar<_>>` due to unsatisfied trait bounds
   |
note: the following trait bounds were not satisfied:
      `<&&Rc<Bar<_>> as Deref>::Target = Bar<&&Rc<Bar<_>>>`
      `<&Bar<_> as Deref>::Target = Bar<&Bar<_>>`
      `<&Rc<Bar<_>> as Deref>::Target = Bar<&Rc<Bar<_>>>`
      `<&mut &Rc<Bar<_>> as Deref>::Target = Bar<&mut &Rc<Bar<_>>>`
      `<&mut Bar<_> as Deref>::Target = Bar<&mut Bar<_>>`
      `<&mut Rc<Bar<_>> as Deref>::Target = Bar<&mut Rc<Bar<_>>>`
      `<Rc<Bar<_>> as Deref>::Target = Bar<Rc<Bar<_>>>`
      `Bar<_>: Deref`
  --> /checkout/tests/ui/self/arbitrary-self-from-method-substs.rs:60:9
   |
LL | impl<R: std::ops::Deref<Target = Self>> Bar<R> {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ------
   |         |               |
   |         |               unsatisfied trait bound introduced here
   |         unsatisfied trait bound introduced here
note: the trait `Deref` must be implemented
---
182 
- error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
-   --> $DIR/impls.rs:195:23
-    |
- LL |     needs_metasized::<([u8], [u8])>();
-    |                       ^^^^^^^^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `[u8]`
-    = note: only the last element of a tuple may have a dynamically sized type
- 
- error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
-   --> $DIR/impls.rs:197:26
-    |
- LL |     needs_pointeesized::<([u8], [u8])>();
-    |                          ^^^^^^^^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `[u8]`
-    = note: only the last element of a tuple may have a dynamically sized type
- 
- error[E0277]: the size for values of type `main::Foo` cannot be known at compilation time
-   --> $DIR/impls.rs:201:19
-    |
- LL |     needs_sized::<(Foo, Foo)>();
-    |                   ^^^^^^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `main::Foo`
-    = note: only the last element of a tuple may have a dynamically sized type
- 
- error[E0277]: the size for values of type `main::Foo` cannot be known at compilation time
-   --> $DIR/impls.rs:203:23
-    |
- LL |     needs_metasized::<(Foo, Foo)>();
-    |                       ^^^^^^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `main::Foo`
-    = note: only the last element of a tuple may have a dynamically sized type
- 
219 error[E0277]: the size for values of type `main::Foo` cannot be known
220   --> $DIR/impls.rs:203:23
221    |

230 LL | fn needs_metasized<T: MetaSized>() { }
231    |                       ^^^^^^^^^ required by this bound in `needs_metasized`
232 
- error[E0277]: the size for values of type `main::Foo` cannot be known at compilation time
-   --> $DIR/impls.rs:206:26
-    |
- LL |     needs_pointeesized::<(Foo, Foo)>();
-    |                          ^^^^^^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `main::Foo`
-    = note: only the last element of a tuple may have a dynamically sized type
- 
242 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
243   --> $DIR/impls.rs:210:19
244    |

389 LL | fn needs_metasized<T: MetaSized>() { }
390    |                       ^^^^^^^^^ required by this bound in `needs_metasized`
391 
- error: aborting due to 27 previous errors
+ error: aborting due to 22 previous errors
393 
394 For more information about this error, try `rustc --explain E0277`.
---
To only update this specific test, also pass `--test-args sized-hierarchy/impls.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/sized-hierarchy/impls.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/sized-hierarchy/impls" "-A" "unused" "-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=2024"
stdout: none
--- stderr -------------------------------
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:235:42
   |
LL |     struct StructAllFieldsMetaSized { x: [u8], y: [u8] }
   |                                          ^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u8]`
   = note: only the last field of a struct may have a dynamically sized type
   = help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
   |
LL |     struct StructAllFieldsMetaSized { x: &[u8], y: [u8] }
   |                                          +
help: the `Box` type always has a statically known size and allocates its contents in the heap
   |
LL |     struct StructAllFieldsMetaSized { x: Box<[u8]>, y: [u8] }
   |                                          ++++    +

error[E0277]: the size for values of type `main::Foo` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:243:40
   |
LL |     struct StructAllFieldsUnsized { x: Foo, y: Foo }
   |                                        ^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `main::Foo`
   = note: only the last field of a struct may have a dynamically sized type
   = help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
   |
LL |     struct StructAllFieldsUnsized { x: &Foo, y: Foo }
   |                                        +
help: the `Box` type always has a statically known size and allocates its contents in the heap
   |
LL |     struct StructAllFieldsUnsized { x: Box<Foo>, y: Foo }
   |                                        ++++   +

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:279:44
   |
LL |     enum EnumAllFieldsMetaSized { Qux { x: [u8], y: [u8] } }
   |                                            ^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u8]`
   = note: no field of an enum variant may have a dynamically sized type
   = help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
   |
LL |     enum EnumAllFieldsMetaSized { Qux { x: &[u8], y: [u8] } }
   |                                            +
help: the `Box` type always has a statically known size and allocates its contents in the heap
   |
LL |     enum EnumAllFieldsMetaSized { Qux { x: Box<[u8]>, y: [u8] } }
   |                                            ++++    +

error[E0277]: the size for values of type `main::Foo` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:286:42
   |
LL |     enum EnumAllFieldsUnsized { Qux { x: Foo, y: Foo } }
   |                                          ^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `main::Foo`
   = note: no field of an enum variant may have a dynamically sized type
   = help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
   |
LL |     enum EnumAllFieldsUnsized { Qux { x: &Foo, y: Foo } }
   |                                          +
help: the `Box` type always has a statically known size and allocates its contents in the heap
   |
LL |     enum EnumAllFieldsUnsized { Qux { x: Box<Foo>, y: Foo } }
   |                                          ++++   +

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:293:52
   |
LL |     enum EnumLastFieldMetaSized { Qux { x: u32, y: [u8] } }
   |                                                    ^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u8]`
   = note: no field of an enum variant may have a dynamically sized type
   = help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
   |
LL |     enum EnumLastFieldMetaSized { Qux { x: u32, y: &[u8] } }
   |                                                    +
help: the `Box` type always has a statically known size and allocates its contents in the heap
   |
LL |     enum EnumLastFieldMetaSized { Qux { x: u32, y: Box<[u8]> } }
   |                                                    ++++    +

error[E0277]: the size for values of type `main::Foo` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:300:50
   |
LL |     enum EnumLastFieldUnsized { Qux { x: u32, y: Foo } }
   |                                                  ^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `main::Foo`
   = note: no field of an enum variant may have a dynamically sized type
   = help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
   |
LL |     enum EnumLastFieldUnsized { Qux { x: u32, y: &Foo } }
   |                                                  +
help: the `Box` type always has a statically known size and allocates its contents in the heap
   |
LL |     enum EnumLastFieldUnsized { Qux { x: u32, y: Box<Foo> } }
   |                                                  ++++   +

error[E0277]: the size for values of type `str` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:155:19
   |
LL |     needs_sized::<str>();
   |                   ^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `str`
note: required by a bound in `needs_sized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:13:19
   |
LL | fn needs_sized<T: Sized>() { }
   |                   ^^^^^ required by this bound in `needs_sized`

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:161:19
   |
LL |     needs_sized::<[u8]>();
   |                   ^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u8]`
note: required by a bound in `needs_sized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:13:19
   |
LL | fn needs_sized<T: Sized>() { }
   |                   ^^^^^ required by this bound in `needs_sized`

error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:167:19
   |
LL |     needs_sized::<dyn Debug>();
   |                   ^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `dyn Debug`
note: required by a bound in `needs_sized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:13:19
   |
LL | fn needs_sized<T: Sized>() { }
   |                   ^^^^^ required by this bound in `needs_sized`

error[E0277]: the size for values of type `main::Foo` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:176:19
   |
LL |     needs_sized::<Foo>();
   |                   ^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `main::Foo`
note: required by a bound in `needs_sized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:13:19
   |
LL | fn needs_sized<T: Sized>() { }
   |                   ^^^^^ required by this bound in `needs_sized`

error[E0277]: the size for values of type `main::Foo` cannot be known
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:178:23
   |
LL |     needs_metasized::<Foo>();
   |                       ^^^ doesn't have a known size
   |
   = help: the trait `MetaSized` is not implemented for `main::Foo`
note: required by a bound in `needs_metasized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:16:23
   |
LL | fn needs_metasized<T: MetaSized>() { }
   |                       ^^^^^^^^^ required by this bound in `needs_metasized`

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:193:19
   |
LL |     needs_sized::<([u8], [u8])>();
   |                   ^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u8]`
   = note: only the last element of a tuple may have a dynamically sized type

error[E0277]: the size for values of type `main::Foo` cannot be known
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:203:23
   |
LL |     needs_metasized::<(Foo, Foo)>();
   |                       ^^^^^^^^^^ doesn't have a known size
   |
   = help: within `(main::Foo, main::Foo)`, the trait `MetaSized` is not implemented for `main::Foo`
   = note: required because it appears within the type `(main::Foo, main::Foo)`
note: required by a bound in `needs_metasized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:16:23
   |
LL | fn needs_metasized<T: MetaSized>() { }
   |                       ^^^^^^^^^ required by this bound in `needs_metasized`

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:210:19
   |
LL |     needs_sized::<(u32, [u8])>();
   |                   ^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `(u32, [u8])`, the trait `Sized` is not implemented for `[u8]`
   = note: required because it appears within the type `(u32, [u8])`
note: required by a bound in `needs_sized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:13:19
   |
LL | fn needs_sized<T: Sized>() { }
   |                   ^^^^^ required by this bound in `needs_sized`

error[E0277]: the size for values of type `main::Foo` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:216:19
   |
LL |     needs_sized::<(u32, Foo)>();
   |                   ^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `(u32, main::Foo)`, the trait `Sized` is not implemented for `main::Foo`
   = note: required because it appears within the type `(u32, main::Foo)`
note: required by a bound in `needs_sized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:13:19
   |
LL | fn needs_sized<T: Sized>() { }
   |                   ^^^^^ required by this bound in `needs_sized`

error[E0277]: the size for values of type `main::Foo` cannot be known
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:218:23
   |
LL |     needs_metasized::<(u32, Foo)>();
   |                       ^^^^^^^^^^ doesn't have a known size
   |
   = help: within `(u32, main::Foo)`, the trait `MetaSized` is not implemented for `main::Foo`
   = note: required because it appears within the type `(u32, main::Foo)`
note: required by a bound in `needs_metasized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:16:23
   |
LL | fn needs_metasized<T: MetaSized>() { }
   |                       ^^^^^^^^^ required by this bound in `needs_metasized`

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:237:19
   |
LL |     needs_sized::<StructAllFieldsMetaSized>();
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `StructAllFieldsMetaSized`, the trait `Sized` is not implemented for `[u8]`
note: required because it appears within the type `StructAllFieldsMetaSized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:235:12
   |
LL |     struct StructAllFieldsMetaSized { x: [u8], y: [u8] }
   |            ^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `needs_sized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:13:19
   |
LL | fn needs_sized<T: Sized>() { }
   |                   ^^^^^ required by this bound in `needs_sized`

error[E0277]: the size for values of type `main::Foo` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:245:19
   |
LL |     needs_sized::<StructAllFieldsUnsized>();
   |                   ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `StructAllFieldsUnsized`, the trait `Sized` is not implemented for `main::Foo`
note: required because it appears within the type `StructAllFieldsUnsized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:243:12
   |
LL |     struct StructAllFieldsUnsized { x: Foo, y: Foo }
   |            ^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `needs_sized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:13:19
   |
LL | fn needs_sized<T: Sized>() { }
   |                   ^^^^^ required by this bound in `needs_sized`

error[E0277]: the size for values of type `main::Foo` cannot be known
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:247:23
   |
LL |     needs_metasized::<StructAllFieldsUnsized>();
   |                       ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a known size
   |
   = help: within `StructAllFieldsUnsized`, the trait `MetaSized` is not implemented for `main::Foo`
note: required because it appears within the type `StructAllFieldsUnsized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:243:12
   |
LL |     struct StructAllFieldsUnsized { x: Foo, y: Foo }
   |            ^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `needs_metasized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:16:23
   |
LL | fn needs_metasized<T: MetaSized>() { }
   |                       ^^^^^^^^^ required by this bound in `needs_metasized`

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:253:19
   |
LL |     needs_sized::<StructLastFieldMetaSized>();
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `StructLastFieldMetaSized`, the trait `Sized` is not implemented for `[u8]`
note: required because it appears within the type `StructLastFieldMetaSized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:252:12
   |
LL |     struct StructLastFieldMetaSized { x: u32, y: [u8] }
   |            ^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `needs_sized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:13:19
   |
LL | fn needs_sized<T: Sized>() { }
   |                   ^^^^^ required by this bound in `needs_sized`

error[E0277]: the size for values of type `main::Foo` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:260:19
   |
LL |     needs_sized::<StructLastFieldUnsized>();
   |                   ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `StructLastFieldUnsized`, the trait `Sized` is not implemented for `main::Foo`
note: required because it appears within the type `StructLastFieldUnsized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:259:12
   |
LL |     struct StructLastFieldUnsized { x: u32, y: Foo }
   |            ^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `needs_sized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:13:19
   |
LL | fn needs_sized<T: Sized>() { }
   |                   ^^^^^ required by this bound in `needs_sized`

error[E0277]: the size for values of type `main::Foo` cannot be known
##[error]  --> /checkout/tests/ui/sized-hierarchy/impls.rs:262:23
   |
LL |     needs_metasized::<StructLastFieldUnsized>();
   |                       ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a known size
   |
   = help: within `StructLastFieldUnsized`, the trait `MetaSized` is not implemented for `main::Foo`
note: required because it appears within the type `StructLastFieldUnsized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:259:12
   |
LL |     struct StructLastFieldUnsized { x: u32, y: Foo }
   |            ^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `needs_metasized`
  --> /checkout/tests/ui/sized-hierarchy/impls.rs:16:23
   |
LL | fn needs_metasized<T: MetaSized>() { }
   |                       ^^^^^^^^^ required by this bound in `needs_metasized`

error: aborting due to 22 previous errors

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
---
38 
- error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known at compilation time
-   --> $DIR/pretty-print-opaque.rs:40:30
-    |
- LL |         let y: Box<dyn Tr> = x;
-    |                              ^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `impl Tr + PointeeSized`
-    = note: required for the cast from `Box<impl Tr + PointeeSized>` to `Box<dyn Tr>`
- 
48 error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known
49   --> $DIR/pretty-print-opaque.rs:40:30
50    |

54    = help: the trait `MetaSized` is not implemented for `impl Tr + PointeeSized`
55    = note: required for the cast from `Box<impl Tr + PointeeSized>` to `Box<dyn Tr>`
56 
- error: aborting due to 6 previous errors
+ error: aborting due to 5 previous errors
58 
59 For more information about this error, try `rustc --explain E0277`.
---
To only update this specific test, also pass `--test-args sized-hierarchy/pretty-print-opaque.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/sized-hierarchy/pretty-print-opaque.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/sized-hierarchy/pretty-print-opaque" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--crate-type=lib"
stdout: none
--- stderr -------------------------------
error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known
##[error]  --> /checkout/tests/ui/sized-hierarchy/pretty-print-opaque.rs:35:26
   |
LL | pub fn pointeesized() -> Box<impl Tr + PointeeSized> {
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a known size
   |
   = help: the trait `MetaSized` is not implemented for `impl Tr + PointeeSized`
note: required by a bound in `Box`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:231:1

error[E0277]: the size for values of type `impl Tr + MetaSized` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/pretty-print-opaque.rs:20:30
   |
LL |         let y: Box<dyn Tr> = x;
   |                              ^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `impl Tr + MetaSized`
   = note: required for the cast from `Box<impl Tr + MetaSized>` to `Box<dyn Tr>`

error[E0277]: the size for values of type `impl Tr + MetaSized` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/sized-hierarchy/pretty-print-opaque.rs:29:30
   |
LL |         let y: Box<dyn Tr> = x;
   |                              ^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `impl Tr + MetaSized`
   = note: required for the cast from `Box<impl Tr + MetaSized>` to `Box<dyn Tr>`

error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known
##[error]  --> /checkout/tests/ui/sized-hierarchy/pretty-print-opaque.rs:38:17
   |
LL |         let x = pointeesized();
---

error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known
##[error]  --> /checkout/tests/ui/sized-hierarchy/pretty-print-opaque.rs:40:30
   |
LL |         let y: Box<dyn Tr> = x;
   |                              ^ doesn't have a known size
   |
   = help: the trait `MetaSized` is not implemented for `impl Tr + PointeeSized`
   = note: required for the cast from `Box<impl Tr + PointeeSized>` to `Box<dyn Tr>`

error: aborting due to 5 previous errors

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

98    |            |
99    |            this could be changed to `T: ?Sized`...
100 
- error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
-   --> $DIR/field-implied-unsizing-wfcheck.rs:26:14
-    |
- LL |     FooTuple(&Bar(4));
-    |              ^^^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
- note: required by an implicit `Sized` bound in `Bar`
-   --> $DIR/field-implied-unsizing-wfcheck.rs:19:12
-    |
- LL | struct Bar<T>(T);
-    |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
- help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
-   --> $DIR/field-implied-unsizing-wfcheck.rs:19:12
-    |
- LL | struct Bar<T>(T);
-    |            ^  - ...if indirection were used here: `Box<T>`
-    |            |
-    |            this could be changed to `T: ?Sized`...
- 
- error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
-   --> $DIR/field-implied-unsizing-wfcheck.rs:28:32
-    |
- LL |     FooEnum1::Struct { nested: &Bar(4) };
-    |                                ^^^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
- note: required by an implicit `Sized` bound in `Bar`
-   --> $DIR/field-implied-unsizing-wfcheck.rs:19:12
-    |
- LL | struct Bar<T>(T);
-    |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
- help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
-   --> $DIR/field-implied-unsizing-wfcheck.rs:19:12
-    |
- LL | struct Bar<T>(T);
-    |            ^  - ...if indirection were used here: `Box<T>`
-    |            |
-    |            this could be changed to `T: ?Sized`...
- 
- error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
-   --> $DIR/field-implied-unsizing-wfcheck.rs:30:21
-    |
- LL |     FooEnum2::Tuple(&Bar(4));
-    |                     ^^^^^^^ doesn't have a size known at compile-time
-    |
-    = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
- note: required by an implicit `Sized` bound in `Bar`
-   --> $DIR/field-implied-unsizing-wfcheck.rs:19:12
-    |
- LL | struct Bar<T>(T);
-    |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
- help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
-   --> $DIR/field-implied-unsizing-wfcheck.rs:19:12
-    |
- LL | struct Bar<T>(T);
-    |            ^  - ...if indirection were used here: `Box<T>`
-    |            |
-    |            this could be changed to `T: ?Sized`...
- 
- error: aborting due to 8 previous errors
+ error: aborting due to 5 previous errors
---
To only update this specific test, also pass `--test-args structs/field-implied-unsizing-wfcheck.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/structs/field-implied-unsizing-wfcheck.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/structs/field-implied-unsizing-wfcheck" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:2:13
   |
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
note: required by an implicit `Sized` bound in `Bar`
  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:19:12
   |
LL | struct Bar<T>(T);
   |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:19:12
   |
LL | struct Bar<T>(T);
   |            ^  - ...if indirection were used here: `Box<T>`
   |            |
   |            this could be changed to `T: ?Sized`...

error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:6:17
   |
LL | struct FooTuple(&'static Bar<dyn std::fmt::Debug>);
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
note: required by an implicit `Sized` bound in `Bar`
  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:19:12
   |
LL | struct Bar<T>(T);
   |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:19:12
   |
LL | struct Bar<T>(T);
   |            ^  - ...if indirection were used here: `Box<T>`
   |            |
   |            this could be changed to `T: ?Sized`...

error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:10:22
   |
LL |     Struct { nested: &'static Bar<dyn std::fmt::Debug> },
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
note: required by an implicit `Sized` bound in `Bar`
  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:19:12
   |
LL | struct Bar<T>(T);
   |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:19:12
   |
LL | struct Bar<T>(T);
   |            ^  - ...if indirection were used here: `Box<T>`
   |            |
   |            this could be changed to `T: ?Sized`...

error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:15:11
   |
LL |     Tuple(&'static Bar<dyn std::fmt::Debug>),
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
note: required by an implicit `Sized` bound in `Bar`
  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:19:12
   |
LL | struct Bar<T>(T);
   |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:19:12
   |
LL | struct Bar<T>(T);
   |            ^  - ...if indirection were used here: `Box<T>`
   |            |
   |            this could be changed to `T: ?Sized`...

error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:24:25
   |
LL |     FooStruct { nested: &Bar(4) };
   |                         ^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
note: required by an implicit `Sized` bound in `Bar`
  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:19:12
   |
LL | struct Bar<T>(T);
   |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
  --> /checkout/tests/ui/structs/field-implied-unsizing-wfcheck.rs:19:12
   |
LL | struct Bar<T>(T);
   |            ^  - ...if indirection were used here: `Box<T>`
   |            |
   |            this could be changed to `T: ?Sized`...

error: aborting due to 5 previous errors

---
-    |
- LL | #[derive(Clone, Copy)]
-    |          ----- in this derive macro expansion
- ...
- LL | struct Bar<T>(T, N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
-    |                                 ^^^^^^^^^^^^^^^^^^^^^^^ `i32` is not an iterator
-    |
-    = help: the trait `Iterator` is not implemented for `i32`
- 
- error: aborting due to 13 previous errors
+ error: aborting due to 12 previous errors
---
To only update this specific test, also pass `--test-args traits/issue-50480.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/issue-50480.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/issue-50480" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0412]: cannot find type `N` in this scope
##[error]  --> /checkout/tests/ui/traits/issue-50480.rs:3:12
   |
LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |            ^ not found in this scope
   |
help: you might be missing a type parameter
   |
LL | struct Foo<N>(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |           +++

error[E0412]: cannot find type `NotDefined` in this scope
##[error]  --> /checkout/tests/ui/traits/issue-50480.rs:3:15
   |
LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |               ^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `N` in this scope
##[error]  --> /checkout/tests/ui/traits/issue-50480.rs:3:12
   |
LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |            ^ not found in this scope
   |
help: you might be missing a type parameter
   |
LL | struct Foo<N>(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |           +++

error[E0412]: cannot find type `NotDefined` in this scope
##[error]  --> /checkout/tests/ui/traits/issue-50480.rs:3:15
   |
LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |               ^^^^^^^^^^ not found in this scope
   |
help: you might be missing a type parameter
   |
LL | struct Foo<NotDefined>(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |           ++++++++++++

error[E0412]: cannot find type `N` in this scope
##[error]  --> /checkout/tests/ui/traits/issue-50480.rs:14:18
   |
LL | struct Bar<T>(T, N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |            -     ^
   |            |
   |            similarly named type parameter `T` defined here
   |
help: a type parameter with a similar name exists
   |
LL - struct Bar<T>(T, N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
LL + struct Bar<T>(T, T, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |
help: you might be missing a type parameter
   |
LL | struct Bar<T, N>(T, N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |             +++

error[E0412]: cannot find type `NotDefined` in this scope
##[error]  --> /checkout/tests/ui/traits/issue-50480.rs:14:21
   |
LL | struct Bar<T>(T, N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |                     ^^^^^^^^^^ not found in this scope

error[E0277]: `i32` is not an iterator
##[error]  --> /checkout/tests/ui/traits/issue-50480.rs:3:27
   |
LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |                           ^^^^^^^^^^^^^^^^^^^^^^^ `i32` is not an iterator
   |
   = help: the trait `Iterator` is not implemented for `i32`

error[E0204]: the trait `Copy` cannot be implemented for this type
##[error]  --> /checkout/tests/ui/traits/issue-50480.rs:1:17
   |
LL | #[derive(Clone, Copy)]
   |                 ^^^^
LL | //~^ ERROR the trait `Copy` cannot be implemented for this type
LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |                                                    --------  ------ this field does not implement `Copy`
   |                                                    |
   |                                                    this field does not implement `Copy`

error[E0204]: the trait `Copy` cannot be implemented for this type
##[error]  --> /checkout/tests/ui/traits/issue-50480.rs:11:17
   |
LL | #[derive(Clone, Copy)]
   |                 ^^^^
...
LL | struct Bar<T>(T, N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |                                                          --------  ------ this field does not implement `Copy`
   |                                                          |
   |                                                          this field does not implement `Copy`

error[E0277]: `i32` is not an iterator
##[error]  --> /checkout/tests/ui/traits/issue-50480.rs:14:33
   |
LL | struct Bar<T>(T, N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^ `i32` is not an iterator
   |
   = help: the trait `Iterator` is not implemented for `i32`

error[E0277]: `i32` is not an iterator
##[error]  --> /checkout/tests/ui/traits/issue-50480.rs:3:28
   |
LL | struct Foo(N, NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
   |                            ^^^ `i32` is not an iterator
   |
   = help: the trait `Iterator` is not implemented for `i32`

error[E0277]: `i32` is not an iterator
##[error]  --> /checkout/tests/ui/traits/issue-50480.rs:11:10
---
1 error[E0271]: type mismatch resolving `A == B`
-   --> $DIR/more-object-bound.rs:12:5
+   --> $DIR/more-object-bound.rs:12:17
3    |
4 LL |     foo::<A, B, dyn Trait<A = A, B = B>>(x)
-    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^ types differ
6    |
7    = note: required because it appears within the type `dyn Trait<A = A, B = B>`
8 note: required by a bound in `foo`

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/next-solver/more-object-bound.rs:12:17
+   --> $DIR/more-object-bound.rs:12:17
---
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" "-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 `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`.
---

17 LL |         ""
18    |         ^^ expected `&str`, found `i32`
19 
- error[E0271]: type mismatch resolving `<Result<i32, i32> as Try>::Output == ()`
-   --> $DIR/try-block-bad-type.rs:15:39
-    |
- LL |     let res: Result<i32, i32> = try { };
-    |                                       ^ expected `()`, found `i32`
- 
- error[E0277]: a `try` block must return `Result` or `Option` (or another type that implements `Try`)
+ error[E0277]: the trait bound `(): FromResidual<_>` is not satisfied
27   --> $DIR/try-block-bad-type.rs:17:25
28    |
29 LL |     let res: () = try { };

-    |                         ^ could not wrap the final value of the block as `()` doesn't implement `Try`
-    |
-    = help: the trait `Try` is not implemented for `()`
+    |                         ^ the trait `FromResidual<_>` is not implemented for `()`
33 
- error[E0277]: a `try` block must return `Result` or `Option` (or another type that implements `Try`)
-   --> $DIR/try-block-bad-type.rs:20:26
-    |
- LL |     let res: i32 = try { 5 };
-    |                          ^ could not wrap the final value of the block as `i32` doesn't implement `Try`
-    |
---
To only update this specific test, also pass `--test-args try-block/try-block-bad-type.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/try-block/try-block-bad-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" "--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/try-block/try-block-bad-type" "-A" "unused" "-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=2018"
stdout: none
--- stderr -------------------------------
error[E0277]: `?` couldn't convert the error to `TryFromSliceError`
##[error]  --> /checkout/tests/ui/try-block/try-block-bad-type.rs:7:16
   |
LL |         Err("")?; //~ ERROR `?` couldn't convert the error
   |         -------^ the trait `From<&str>` is not implemented for `TryFromSliceError`
   |         |
   |         this can't be annotated with `?` because it has type `Result<_, &str>`
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = help: the trait `From<&str>` is not implemented for `TryFromSliceError`
           but trait `From<Infallible>` is implemented for it
   = help: for that trait implementation, expected `Infallible`, found `&str`

error[E0271]: type mismatch resolving `<Result<i32, i32> as Try>::Output == &str`
##[error]  --> /checkout/tests/ui/try-block/try-block-bad-type.rs:12:9
   |
LL |         "" //~ ERROR type mismatch
   |         ^^ expected `&str`, found `i32`

error[E0277]: the trait bound `(): FromResidual<_>` is not satisfied
##[error]  --> /checkout/tests/ui/try-block/try-block-bad-type.rs:17:25
   |
LL |     let res: () = try { };
   |                         ^ the trait `FromResidual<_>` is not implemented for `()`

error: aborting due to 3 previous errors

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

4 LL |         42
5    |         ^^ expected integer, found `f32`
6 
- error[E0271]: type mismatch resolving `<Option<i32> as Try>::Output == ()`
-   --> $DIR/try-block-type-error.rs:16:5
-    |
- LL |     };
-    |     ^ expected `()`, found `i32`
- 
---
To only update this specific test, also pass `--test-args try-block/try-block-type-error.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/try-block/try-block-type-error.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/try-block/try-block-type-error" "-A" "unused" "-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=2018"
stdout: none
--- stderr -------------------------------
error[E0271]: type mismatch resolving `<Option<f32> as Try>::Output == {integer}`
##[error]  --> /checkout/tests/ui/try-block/try-block-type-error.rs:10:9
   |
LL |         42
   |         ^^ expected integer, found `f32`

---
To only update this specific test, also pass `--test-args try-trait/try-operator-on-main.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/try-trait/try-operator-on-main.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/try-trait/try-operator-on-main" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
##[error]  --> /checkout/tests/ui/try-trait/try-operator-on-main.rs:7:31
   |
LL | fn main() {
   | --------- this function should return `Result` or `Option` to accept `?`
LL |     // error for a `Try` type on a non-`Try` fn
LL |     std::fs::File::open("foo")?; //~ ERROR the `?` operator can only
   |                               ^ cannot use the `?` operator in a function that returns `()`
   |
help: consider adding return type
   |
LL ~ fn main() -> Result<(), Box<dyn std::error::Error>> {
LL |     // error for a `Try` type on a non-`Try` fn
...
LL |     try_trait_generic::<()>(); //~ ERROR the trait bound
LL +     Ok(())
   |

error[E0277]: the `?` operator can only be applied to values that implement `Try`
##[error]  --> /checkout/tests/ui/try-trait/try-operator-on-main.rs:10:5
   |
LL |     ()?; //~ ERROR the `?` operator can only be applied to
   |     ^^^ the `?` operator cannot be applied to type `()`
   |
   = help: the trait `Try` is not implemented for `()`

error[E0277]: the trait bound `(): Try` is not satisfied
##[error]  --> /checkout/tests/ui/try-trait/try-operator-on-main.rs:14:25
   |
LL |     try_trait_generic::<()>(); //~ ERROR the trait bound
   |                         ^^ the trait `Try` is not implemented for `()`
   |
note: required by a bound in `try_trait_generic`
  --> /checkout/tests/ui/try-trait/try-operator-on-main.rs:17:25
   |
LL | fn try_trait_generic<T: Try>() -> T {
   |                         ^^^ required by this bound in `try_trait_generic`

error[E0277]: the `?` operator can only be applied to values that implement `Try`
##[error]  --> /checkout/tests/ui/try-trait/try-operator-on-main.rs:19:5
   |
LL |     ()?; //~ ERROR the `?` operator can only be applied to values that implement `Try`
   |     ^^^ the `?` operator cannot be applied to type `()`
   |
   = help: the trait `Try` is not implemented for `()`

error: aborting due to 4 previous errors
---
17 
- error[E0277]: the trait bound `char: Neg` is not satisfied
-   --> $DIR/signed_ranges.rs:20:9
-    |
- LL |         -'\0'..'a' => {}
-    |         ^^^^^ the trait `Neg` is not implemented for `char`
- 
24 error[E0600]: cannot apply unary operator `-` to type `u32`
25   --> $DIR/signed_ranges.rs:6:34
26    |

35 LL | type SignedChar = pattern_type!(char is -'A'..);
36    |                                         ^^^^ cannot apply unary operator `-`
37 
- error: aborting due to 4 previous errors
+ error: aborting due to 3 previous errors
39 
40 Some errors have detailed explanations: E0277, E0600.
---
To only update this specific test, also pass `--test-args type/pattern_types/signed_ranges.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/type/pattern_types/signed_ranges.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/type/pattern_types/signed_ranges" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `u8: Neg` is not satisfied
##[error]  --> /checkout/tests/ui/type/pattern_types/signed_ranges.rs:14:9
   |
LL |         -10..253 => {}
   |         ^^^ the trait `Neg` is not implemented for `u8`
   |
---

error[E0600]: cannot apply unary operator `-` to type `u32`
##[error]  --> /checkout/tests/ui/type/pattern_types/signed_ranges.rs:6:34
   |
LL | type Sign = pattern_type!(u32 is -10..);
   |                                  ^^^ cannot apply unary operator `-`
   |
   = note: unsigned values cannot be negated

error[E0600]: cannot apply unary operator `-` to type `char`
##[error]  --> /checkout/tests/ui/type/pattern_types/signed_ranges.rs:9:41
   |
LL | type SignedChar = pattern_type!(char is -'A'..);
   |                                         ^^^^ cannot apply unary operator `-`

error: aborting due to 3 previous errors

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


---- [ui] tests/ui/unsized/unsized6.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/unsized/unsized6/unsized6.stderr`
diff of stderr:

34 LL + fn f1<W: ?Sized, X, Y: ?Sized, Z: ?Sized>(x: &X) {
35    |
36 
- error[E0277]: the size for values of type `Z` cannot be known at compilation time
-   --> $DIR/unsized6.rs:11:12
-    |
- LL | fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
-    |                                        - this type parameter needs to be `Sized`
- ...
- LL |     let y: (isize, (Z, usize));
-    |            ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
-    |
-    = note: only the last element of a tuple may have a dynamically sized type
- help: consider removing the `?Sized` bound to make the type parameter `Sized`
-    |
- LL - fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
- LL + fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z>(x: &X) {
-    |
- 
53 error[E0277]: the size for values of type `X` cannot be known at compilation time
54   --> $DIR/unsized6.rs:15:9
55    |

235 LL | fn g2<X: ?Sized + T>(x: &X) {}
236    |                         +
237 
- error: aborting due to 13 previous errors
+ error: aborting due to 12 previous errors
239 
---
To only update this specific test, also pass `--test-args unsized/unsized6.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/unsized/unsized6.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/unsized/unsized6" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the size for values of type `Y` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/unsized6.rs:9:9
   |
LL | fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
   |                             - this type parameter needs to be `Sized`
...
LL |     let y: Y;
   |         ^ doesn't have a size known at compile-time
   |
   = note: all local variables must have a statically known size
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
LL + fn f1<W: ?Sized, X: ?Sized, Y, Z: ?Sized>(x: &X) {
   |
help: consider borrowing here
   |
LL |     let y: &Y;
   |            +

error[E0277]: the size for values of type `X` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/unsized6.rs:7:12
   |
LL | fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
   |                  - this type parameter needs to be `Sized`
LL |     let _: W; // <-- this is OK, no bindings created, no initializer.
LL |     let _: (isize, (X, isize));
   |            ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = note: only the last element of a tuple may have a dynamically sized type
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
LL + fn f1<W: ?Sized, X, Y: ?Sized, Z: ?Sized>(x: &X) {
   |

error[E0277]: the size for values of type `X` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/unsized6.rs:15:9
   |
LL | fn f2<X: ?Sized, Y: ?Sized>(x: &X) {
   |       - this type parameter needs to be `Sized`
LL |     let y: X;
   |         ^ doesn't have a size known at compile-time
   |
   = note: all local variables must have a statically known size
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn f2<X: ?Sized, Y: ?Sized>(x: &X) {
LL + fn f2<X, Y: ?Sized>(x: &X) {
   |
help: consider borrowing here
   |
LL |     let y: &X;
   |            +

error[E0277]: the size for values of type `Y` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/unsized6.rs:17:12
   |
LL | fn f2<X: ?Sized, Y: ?Sized>(x: &X) {
   |                  - this type parameter needs to be `Sized`
...
LL |     let y: (isize, (Y, isize));
   |            ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = note: only the last element of a tuple may have a dynamically sized type
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn f2<X: ?Sized, Y: ?Sized>(x: &X) {
LL + fn f2<X: ?Sized, Y>(x: &X) {
   |

error[E0277]: the size for values of type `X` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/unsized6.rs:22:9
   |
LL | fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
   |       - this type parameter needs to be `Sized`
LL |     let y: X = *x1;
   |         ^ doesn't have a size known at compile-time
   |
   = note: all local variables must have a statically known size
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
LL + fn f3<X>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
   |
help: consider borrowing here
   |
LL |     let y: &X = *x1;
   |            +

error[E0277]: the size for values of type `X` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/unsized6.rs:24:9
   |
LL | fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
   |       - this type parameter needs to be `Sized`
...
LL |     let y = *x2;
   |         ^ doesn't have a size known at compile-time
   |
   = note: all local variables must have a statically known size
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
LL + fn f3<X>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
   |
help: references are always `Sized`, even if they point to unsized data; consider not dereferencing the expression
   |
LL -     let y = *x2;
LL +     let y = x2;
   |

error[E0277]: the size for values of type `X` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/unsized6.rs:26:10
   |
LL | fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
   |       - this type parameter needs to be `Sized`
...
LL |     let (y, z) = (*x3, 4);
   |          ^ doesn't have a size known at compile-time
   |
   = note: all local variables must have a statically known size
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
LL + fn f3<X>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
   |

error[E0277]: the size for values of type `X` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/unsized6.rs:30:9
   |
LL | fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
   |       - this type parameter needs to be `Sized`
LL |     let y: X = *x1;
   |         ^ doesn't have a size known at compile-time
   |
   = note: all local variables must have a statically known size
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
LL + fn f4<X: T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
   |
help: consider borrowing here
   |
LL |     let y: &X = *x1;
   |            +

error[E0277]: the size for values of type `X` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/unsized6.rs:32:9
   |
LL | fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
   |       - this type parameter needs to be `Sized`
...
LL |     let y = *x2;
   |         ^ doesn't have a size known at compile-time
   |
   = note: all local variables must have a statically known size
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
LL + fn f4<X: T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
   |
help: references are always `Sized`, even if they point to unsized data; consider not dereferencing the expression
   |
LL -     let y = *x2;
LL +     let y = x2;
   |

error[E0277]: the size for values of type `X` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/unsized6.rs:34:10
   |
LL | fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
   |       - this type parameter needs to be `Sized`
...
LL |     let (y, z) = (*x3, 4);
   |          ^ doesn't have a size known at compile-time
   |
   = note: all local variables must have a statically known size
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
LL + fn f4<X: T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
   |

error[E0277]: the size for values of type `X` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/unsized6.rs:38:21
   |
LL | fn g1<X: ?Sized>(x: X) {}
   |       -             ^ doesn't have a size known at compile-time
   |       |
   |       this type parameter needs to be `Sized`
   |
   = help: unsized fn params are gated as an unstable feature
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn g1<X: ?Sized>(x: X) {}
LL + fn g1<X>(x: X) {}
   |
help: function arguments must have a statically known size, borrowed types always have a known size
   |
LL | fn g1<X: ?Sized>(x: &X) {}
   |                     +

error[E0277]: the size for values of type `X` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/unsized6.rs:40:25
   |
LL | fn g2<X: ?Sized + T>(x: X) {}
   |       -                 ^ doesn't have a size known at compile-time
   |       |
   |       this type parameter needs to be `Sized`
   |
   = help: unsized fn params are gated as an unstable feature
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn g2<X: ?Sized + T>(x: X) {}
LL + fn g2<X: T>(x: X) {}
   |
help: function arguments must have a statically known size, borrowed types always have a known size
   |
LL | fn g2<X: ?Sized + T>(x: &X) {}
   |                         +

error: aborting due to 12 previous errors

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

@@ -403,14 +403,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// that are not closures, then we type-check the closures. This is so
// that we have more information about the types of arguments when we
// type-check the functions. This isn't really the right way to do this.
self.select_obligations_where_possible(|_| {});
Copy link
Member

Choose a reason for hiding this comment

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

What is this new call to select for? It may affect inference and also performance 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is this new call to select for? It may affect inference and also performance 🤔

sorry, commit the debug code, will be fix in next pr.

@compiler-errors
Copy link
Member

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Aug 2, 2025

⌛ Trying commit 080e25b with merge bd230c7

To cancel the try build, run the command @bors try cancel.

rust-bors bot added a commit that referenced this pull request Aug 2, 2025
fix issue 144074, having so many same diagnostics makes it hard to re…
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 2, 2025
@rust-bors
Copy link

rust-bors bot commented Aug 2, 2025

☀️ Try build successful (CI)
Build commit: bd230c7 (bd230c7ae08dbc5139846d6179cde18b3730e622, parent: 6d091b2baa33698682453c7bb72809554204e434)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bd230c7): comparison URL.

Overall result: ❌ regressions - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.2% [0.1%, 0.2%] 8
Regressions ❌
(secondary)
0.5% [0.1%, 0.9%] 27
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.1%, 0.2%] 8

Max RSS (memory usage)

Results (primary -0.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.8% [0.8%, 0.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.3% [-1.4%, -1.2%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.6% [-1.4%, 0.8%] 3

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 469.09s -> 468.987s (-0.02%)
Artifact size: 376.98 MiB -> 376.98 MiB (0.00%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants