Skip to content

Conversation

@lcnr
Copy link
Contributor

@lcnr lcnr commented Oct 29, 2025

We currently rely on generalize to emit WF obligations to constrain bivariant arguments.
This causes issues in the new solver and fixing it is annoying rust-lang/trait-system-refactor-initiative#250. It seems a lot nicer to simply require all used "root types" to be well-formed.

This requires to following additions:

  • locals currently only get checked for WF if they have an explicit type annotation
  • coercions need to require the individual lubs to be wf as otherwise (a lub b) lub c) never checks that (a lub b) by itself is WF

r? @ghost

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 29, 2025
@lcnr
Copy link
Contributor Author

lcnr commented Oct 29, 2025

@bors try

rust-bors bot added a commit that referenced this pull request Oct 29, 2025
require all locals to be wf, no wf obligations in generalize
@rust-bors

This comment has been minimized.

@lcnr
Copy link
Contributor Author

lcnr commented Oct 29, 2025

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 29, 2025
require all locals to be wf, no wf obligations in generalize
@lcnr
Copy link
Contributor Author

lcnr commented Oct 29, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 29, 2025
rust-bors bot added a commit that referenced this pull request Oct 29, 2025
require all locals to be wf, no wf obligations in generalize
@rust-log-analyzer

This comment has been minimized.

@lcnr
Copy link
Contributor Author

lcnr commented Oct 29, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 29, 2025
require all locals to be wf, no wf obligations in generalize
@rust-bors

This comment has been minimized.

@lcnr
Copy link
Contributor Author

lcnr commented Oct 29, 2025

@bors try

rust-bors bot added a commit that referenced this pull request Oct 29, 2025
require all locals to be wf, no wf obligations in generalize
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@lcnr lcnr changed the title require all locals to be wf, no wf obligations in generalize no wf obligations in generalize Oct 29, 2025
@rust-bors
Copy link

rust-bors bot commented Oct 29, 2025

☀️ Try build successful (CI)
Build commit: 2d9e87c (2d9e87c1a5384d45f9039f5571a38ab47ec29214, parent: c6d42d774d1edfb270b8faaefacc67c213b0260b)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2d9e87c): comparison URL.

Overall result: ❌✅ regressions and improvements - 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.3% [0.1%, 0.4%] 34
Regressions ❌
(secondary)
1.8% [0.1%, 4.5%] 36
Improvements ✅
(primary)
-2.9% [-2.9%, -2.9%] 1
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 3
All ❌✅ (primary) 0.2% [-2.9%, 0.4%] 35

Max RSS (memory usage)

Results (primary 0.7%, secondary -0.2%)

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

mean range count
Regressions ❌
(primary)
0.7% [0.7%, 0.7%] 1
Regressions ❌
(secondary)
1.2% [0.6%, 2.3%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.1% [-3.2%, -2.9%] 2
All ❌✅ (primary) 0.7% [0.7%, 0.7%] 1

Cycles

Results (primary -0.2%, secondary 1.0%)

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

mean range count
Regressions ❌
(primary)
2.3% [2.3%, 2.3%] 1
Regressions ❌
(secondary)
2.9% [2.4%, 3.9%] 6
Improvements ✅
(primary)
-2.7% [-2.7%, -2.7%] 1
Improvements ✅
(secondary)
-4.8% [-6.7%, -2.9%] 2
All ❌✅ (primary) -0.2% [-2.7%, 2.3%] 2

Binary size

Results (primary -1.1%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.1% [-1.1%, -1.1%] 1

Bootstrap: 475.179s -> 476.419s (0.26%)
Artifact size: 390.26 MiB -> 390.19 MiB (-0.02%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 29, 2025
@lcnr
Copy link
Contributor Author

lcnr commented Oct 30, 2025

something slightly different

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 30, 2025
no wf obligations in generalize
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 30, 2025
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)

failures:

---- [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:

14    |
15    = note: this may fail depending on what value the parameter takes
16 
- error: aborting due to 2 previous errors
+ error: constant expression depends on a generic parameter
+   --> $DIR/associated-const-type-parameter-arrays-2.rs:16:5
+    |
+ LL |     let _array = [4; <A as Foo>::Y];
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: this may fail depending on what value the parameter takes
+ 
+ error: aborting due to 3 previous errors
---
-   --> /checkout/tests/ui/associated-consts/associated-const-type-parameter-arrays-2.rs:16:5
+ error: constant expression depends on a generic parameter
+   --> $DIR/associated-const-type-parameter-arrays-2.rs:16:5
+    |
+ LL |     let _array = [4; <A as Foo>::Y];
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: this may fail depending on what value the parameter takes
+ 
+ error: aborting due to 3 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" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
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: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/associated-consts/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: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/associated-consts/associated-const-type-parameter-arrays-2.rs:16:5
   |
LL |     let _array = [4; <A as Foo>::Y];
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

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

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

8    = help: consider changing to `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`)
9 
10 error[E0038]: the trait `Foo` is not dyn compatible
-   --> $DIR/inference_var_self_argument.rs:5:5
+   --> $DIR/inference_var_self_argument.rs:5:18
12    |
---
To only update this specific test, also pass `--test-args async-await/inference_var_self_argument.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/inference_var_self_argument.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/inference_var_self_argument" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2021"
stdout: none
--- stderr -------------------------------
error[E0307]: invalid `self` parameter type: `&dyn Foo`
##[error]  --> /checkout/tests/ui/async-await/inference_var_self_argument.rs:5:24
   |
LL |     async fn foo(self: &dyn Foo) {
   |                        ^^^^^^^^
   |
   = note: type of `self` must be `Self` or a type that dereferences to it
   = help: consider changing to `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[E0038]: the trait `Foo` is not dyn compatible
##[error]  --> /checkout/tests/ui/async-await/inference_var_self_argument.rs:5:18
   |
LL |     async fn foo(self: &dyn Foo) {
---
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" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
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/box/into-boxed-slice-fail.rs stdout end ----
---- [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:

267 LL |     let _ = [0; bar::<{ N }>()];
268    |                       +   +
269 
+ error: constant expression depends on a generic parameter
+   --> $DIR/const-arg-in-const-arg.rs:25:5
+    |
+ LL |     let _ = [0; foo::<T>()];
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: this may fail depending on what value the parameter takes
+ 
270 error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
271   --> $DIR/const-arg-in-const-arg.rs:29:23
272    |

361 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
362    |              ^^
363 
- error: aborting due to 37 previous errors
+ error: aborting due to 38 previous errors
365 
366 Some errors have detailed explanations: E0747, E0794.
367 For more information about an error, try `rustc --explain E0747`.

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:25:5
- LL |     let _ = [0; foo::<T>()]; //[min]~ ERROR constant expression depends on a generic parameter
+ error: constant expression depends on a generic parameter
+   --> $DIR/const-arg-in-const-arg.rs:25:5
+    |
+ LL |     let _ = [0; foo::<T>()];
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: this may fail depending on what value the parameter takes
+ 
+ error: aborting due to 38 previous errors
---
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" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
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: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:25:13
   |
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: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/const-generics/const-arg-in-const-arg.rs:25:5
   |
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[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 38 previous errors

Some errors have detailed explanations: E0747, E0794.
---
- error: aborting due to 2 previous errors
+ error: constant expression depends on a generic parameter
+   --> $DIR/generic-parameter-in-const-expression-39211.rs:9:5
+    |
+ LL |     let a = [3; M::Row::DIM];
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: this may fail depending on what value the parameter takes
+ 
+ error: aborting due to 3 previous errors
---
-   --> /checkout/tests/ui/const-generics/generic-parameter-in-const-expression-39211.rs:9:5
+ error: constant expression depends on a generic parameter
+   --> $DIR/generic-parameter-in-const-expression-39211.rs:9:5
+    |
+ LL |     let a = [3; M::Row::DIM];
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: this may fail depending on what value the parameter takes
+ 
+ error: aborting due to 3 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" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
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: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/const-generics/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: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/const-generics/generic-parameter-in-const-expression-39211.rs:9:5
   |
LL |     let a = [3; M::Row::DIM];
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

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

---- [ui] tests/ui/const-generics/generic-parameter-in-const-expression-39211.rs stdout end ----
---- [ui] tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/const-generics/generic_const_exprs/cross_crate_predicate/cross_crate_predicate.stderr`
diff of stderr:

63 LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
64    |              +++++++++++++++++++++++++++++++++++++++++
65 
- error: aborting due to 4 previous errors
+ error: unconstrained generic constant
+   --> $DIR/cross_crate_predicate.rs:7:5
+    |
+ LL |     let _ = const_evaluatable_lib::test1::<T>();
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+ help: try adding a `where` bound
+    |
+ LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
+    |              +++++++++++++++++++++++++++++++++++++++++
+ 
+ error: unconstrained generic constant
+   --> $DIR/cross_crate_predicate.rs:7:5
+    |
+ LL |     let _ = const_evaluatable_lib::test1::<T>();
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+ note: required by a bound in `test1`
+   --> $DIR/auxiliary/const_evaluatable_lib.rs:5:10
+    |
+ LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
+    |        ----- required by a bound in this function
+ LL | where
+ LL |     [u8; std::mem::size_of::<T>() - 1]: Sized,
+    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
+ help: try adding a `where` bound
+    |
+ LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
+    |              +++++++++++++++++++++++++++++++++++++++++
+ 
+ error: aborting due to 6 previous errors
67 
68 
---
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+ help: try adding a `where` bound
+    |
+ LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
+    |              +++++++++++++++++++++++++++++++++++++++++
+ 
+ error: unconstrained generic constant
+   --> $DIR/cross_crate_predicate.rs:7:5
+    |
+ LL |     let _ = const_evaluatable_lib::test1::<T>();
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+ note: required by a bound in `test1`
+   --> $DIR/auxiliary/const_evaluatable_lib.rs:5:10
+    |
+ LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
+    |        ----- required by a bound in this function
+ LL | where
+ LL |     [u8; std::mem::size_of::<T>() - 1]: Sized,
+    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
+ help: try adding a `where` bound
+    |
+ LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
+    |              +++++++++++++++++++++++++++++++++++++++++
+ 
+ error: aborting due to 6 previous errors


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/cross_crate_predicate.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/cross_crate_predicate.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/cross_crate_predicate" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/const-generics/generic_const_exprs/cross_crate_predicate/auxiliary"
stdout: none
--- stderr -------------------------------
error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs:7:44
   |
LL |     let _ = const_evaluatable_lib::test1::<T>();
   |                                            ^
   |
note: required by a bound in `test1`
  --> /checkout/tests/ui/const-generics/generic_const_exprs/auxiliary/const_evaluatable_lib.rs:5:10
   |
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
   |        ----- required by a bound in this function
LL | where
LL |     [u8; std::mem::size_of::<T>() - 1]: Sized,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
help: try adding a `where` bound
   |
LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
   |              +++++++++++++++++++++++++++++++++++++++++

error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs:7:44
   |
LL |     let _ = const_evaluatable_lib::test1::<T>();
   |                                            ^
   |
note: required by a bound in `test1`
  --> /checkout/tests/ui/const-generics/generic_const_exprs/auxiliary/const_evaluatable_lib.rs:3:27
   |
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
help: try adding a `where` bound
   |
LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
   |              +++++++++++++++++++++++++++++++++++++++++

error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs:7:13
   |
LL |     let _ = const_evaluatable_lib::test1::<T>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: try adding a `where` bound
   |
LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
   |              +++++++++++++++++++++++++++++++++++++++++

error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs:7:13
   |
LL |     let _ = const_evaluatable_lib::test1::<T>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: required by a bound in `test1`
  --> /checkout/tests/ui/const-generics/generic_const_exprs/auxiliary/const_evaluatable_lib.rs:5:10
   |
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
   |        ----- required by a bound in this function
LL | where
LL |     [u8; std::mem::size_of::<T>() - 1]: Sized,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
help: try adding a `where` bound
   |
LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
   |              +++++++++++++++++++++++++++++++++++++++++

error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs:7:5
   |
LL |     let _ = const_evaluatable_lib::test1::<T>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: try adding a `where` bound
   |
LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
   |              +++++++++++++++++++++++++++++++++++++++++

error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs:7:5
   |
LL |     let _ = const_evaluatable_lib::test1::<T>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: required by a bound in `test1`
  --> /checkout/tests/ui/const-generics/generic_const_exprs/auxiliary/const_evaluatable_lib.rs:5:10
   |
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
   |        ----- required by a bound in this function
LL | where
LL |     [u8; std::mem::size_of::<T>() - 1]: Sized,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
help: try adding a `where` bound
   |
LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
   |              +++++++++++++++++++++++++++++++++++++++++

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

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

93 LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> where [(); Self::DIM]: {
94    |                                                                  ++++++++++++++++++++++
95 
+ error: unconstrained generic constant
+   --> $DIR/issue-83765.rs:63:9
+    |
+ LL |         let size = self.size();
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+    |
+ help: try adding a `where` bound
+    |
+ LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> where [(); Self::DIM]: {
+    |                                                                  ++++++++++++++++++++++
+ 
96 error[E0277]: the trait bound `[usize; T::DIM]: Default` is not satisfied
97   --> $DIR/issue-83765.rs:65:41
98    |

154    = note: expected constant `Self::DIM`
155               found constant `DIM`
---
+    |         ^^^^^^^^^^^^^^^^^^^^^^^
+    |
+ help: try adding a `where` bound
+    |
+ LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> where [(); Self::DIM]: {
+    |                                                                  ++++++++++++++++++++++
+ 
+ error: aborting due to 15 previous errors


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/issues/issue-83765.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/issues/issue-83765.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/issues/issue-83765" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0308]: method not compatible with trait
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:47:5
   |
LL |     fn size(&self) -> [usize; DIM] {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
   |
   = note: expected constant `Self::DIM`
              found constant `DIM`

error[E0308]: method not compatible with trait
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:55:5
   |
LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
   |
   = note: expected constant `Self::DIM`
              found constant `DIM`

error[E0308]: method not compatible with trait
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:84:5
   |
LL |     fn size(&self) -> [usize; DIM] {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
   |
   = note: expected constant `Self::DIM`
              found constant `DIM`

error[E0308]: method not compatible with trait
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:96:5
   |
LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
   |
   = note: expected constant `Self::DIM`
              found constant `DIM`

error[E0308]: method not compatible with trait
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:108:5
   |
LL |     fn size(&self) -> [usize; 1] {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `1`
   |
   = note: expected constant `Self::DIM`
              found constant `1`

error[E0308]: method not compatible with trait
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:115:5
   |
LL |     fn bget(&self, index: [usize; 1]) -> Option<T> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `1`
   |
   = note: expected constant `Self::DIM`
              found constant `1`

error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:58:13
   |
LL |         if !self.inbounds(index) {
   |             ^^^^
   |
note: required by a bound in `TensorSize::inbounds`
  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:14:39
   |
LL |     fn inbounds(&self, index: [usize; Self::DIM]) -> bool {
   |                                       ^^^^^^^^^ required by this bound in `TensorSize::inbounds`
help: try adding a `where` bound
   |
LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> where [(); Self::DIM]: {
   |                                                                  ++++++++++++++++++++++

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:58:27
   |
LL |         if !self.inbounds(index) {
   |                           ^^^^^ expected `Self::DIM`, found `DIM`
   |
   = note: expected constant `Self::DIM`
              found constant `DIM`

error: unconstrained generic constant
---
   |
note: required by a bound in `TensorSize::size`
  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:13:31
   |
LL |     fn size(&self) -> [usize; Self::DIM];
   |                               ^^^^^^^^^ required by this bound in `TensorSize::size`
help: try adding a `where` bound
   |
LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> where [(); Self::DIM]: {
   |                                                                  ++++++++++++++++++++++

error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:63:9
   |
LL |         let size = self.size();
   |         ^^^^^^^^^^^^^^^^^^^^^^^
   |
help: try adding a `where` bound
   |
LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> where [(); Self::DIM]: {
   |                                                                  ++++++++++++++++++++++

error[E0277]: the trait bound `[usize; T::DIM]: Default` is not satisfied
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:65:41
   |
LL |         let newindex: [usize; T::DIM] = Default::default();
   |                                         ^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `[usize; T::DIM]`
   |
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
   |
LL | impl<'a, T: Broadcastable, const DIM: usize> Broadcastable for LazyUpdim<'a, T, { T::DIM }, DIM> where [usize; T::DIM]: Default {
   |                                                                                                  ++++++++++++++++++++++++++++++

error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:86:24
   |
LL |         self.reference.size()
   |                        ^^^^
   |
note: required by a bound in `TensorSize::size`
  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:13:31
   |
LL |     fn size(&self) -> [usize; Self::DIM];
   |                               ^^^^^^^^^ required by this bound in `TensorSize::size`
help: try adding a `where` bound
   |
LL |     fn size(&self) -> [usize; DIM] where [(); Self::DIM]: {
   |                                    ++++++++++++++++++++++

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:86:9
   |
LL |         self.reference.size()
   |         ^^^^^^^^^^^^^^^^^^^^^ expected `DIM`, found `Self::DIM`
   |
   = note: expected constant `DIM`
              found constant `Self::DIM`

error: unconstrained generic constant
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:98:9
   |
LL |         self.reference.bget(index).map(&self.closure)
   |         ^^^^^^^^^^^^^^
   |
note: required by a bound in `Broadcastable::bget`
  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:21:35
   |
LL |     fn bget(&self, index: [usize; Self::DIM]) -> Option<Self::Element>;
   |                                   ^^^^^^^^^ required by this bound in `Broadcastable::bget`
help: try adding a `where` bound
   |
LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> where [(); Self::DIM]: {
   |                                                                  ++++++++++++++++++++++

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-83765.rs:98:29
   |
LL |         self.reference.bget(index).map(&self.closure)
   |                             ^^^^^ expected `Self::DIM`, found `DIM`
   |
   = note: expected constant `Self::DIM`
              found constant `DIM`

error: aborting due to 15 previous errors

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

---- [ui] tests/ui/const-generics/issues/issue-83765.rs stdout end ----
---- [ui] tests/ui/const-generics/occurs-check/unused-substs-1.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/const-generics/occurs-check/unused-substs-1/unused-substs-1.stderr`
diff of stderr:

15 LL |     A<N>: Bar<N>;
16    |           ^^^^^^ required by this bound in `A`
17 
- error: aborting due to 1 previous error
+ error[E0277]: the trait bound `A<_>: Bar<_>` is not satisfied
+   --> $DIR/unused-substs-1.rs:12:5
+    |
+ LL |     let _ = A;
+    |     ^^^^^^^^^^ unsatisfied trait bound
+    |
+    = help: the trait `Bar<_>` is not implemented for `A<_>`
+            but it is implemented for `A<{ 6 + 1 }>`
+ note: required by a bound in `A`
+   --> $DIR/unused-substs-1.rs:9:11
+    |
+ LL | struct A<const N: usize>
+    |        - required by a bound in this struct
+ LL | where
+ LL |     A<N>: Bar<N>;
+    |           ^^^^^^ required by this bound in `A`
+ 
+ error: aborting due to 2 previous errors
19 
20 For more information about this error, try `rustc --explain E0277`.
21 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/const-generics/occurs-check/unused-substs-1.rs:12:5
- LL |     let _ = A; //~ERROR the trait bound
-   --> /checkout/tests/ui/const-generics/occurs-check/unused-substs-1.rs:9:11
+ error[E0277]: the trait bound `A<_>: Bar<_>` is not satisfied
+   --> $DIR/unused-substs-1.rs:12:5
+    |
+ LL |     let _ = A;
+    |     ^^^^^^^^^^ unsatisfied trait bound
+    |
+    = help: the trait `Bar<_>` is not implemented for `A<_>`
+            but it is implemented for `A<{ 6 + 1 }>`
+ note: required by a bound in `A`
+   --> $DIR/unused-substs-1.rs:9:11
+    |
+ LL | struct A<const N: usize>
+    |        - required by a bound in this struct
+ LL | where
+ LL |     A<N>: Bar<N>;
+    |           ^^^^^^ required by this bound in `A`
+ 
+ error: aborting due to 2 previous errors


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/occurs-check/unused-substs-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/const-generics/occurs-check/unused-substs-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/const-generics/occurs-check/unused-substs-1" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `A<_>: Bar<_>` is not satisfied
##[error]  --> /checkout/tests/ui/const-generics/occurs-check/unused-substs-1.rs:12:13
   |
LL |     let _ = A; //~ERROR the trait bound
   |             ^ unsatisfied trait bound
   |
   = help: the trait `Bar<_>` is not implemented for `A<_>`
           but it is implemented for `A<{ 6 + 1 }>`
note: required by a bound in `A`
  --> /checkout/tests/ui/const-generics/occurs-check/unused-substs-1.rs:9:11
   |
LL | struct A<const N: usize>
   |        - required by a bound in this unit struct
LL | where
LL |     A<N>: Bar<N>;
   |           ^^^^^^ required by this bound in `A`

error[E0277]: the trait bound `A<_>: Bar<_>` is not satisfied
##[error]  --> /checkout/tests/ui/const-generics/occurs-check/unused-substs-1.rs:12:5
   |
LL |     let _ = A; //~ERROR the trait bound
   |     ^^^^^^^^^^ unsatisfied trait bound
   |
   = help: the trait `Bar<_>` is not implemented for `A<_>`
           but it is implemented for `A<{ 6 + 1 }>`
note: required by a bound in `A`
  --> /checkout/tests/ui/const-generics/occurs-check/unused-substs-1.rs:9:11
   |
LL | struct A<const N: usize>
   |        - required by a bound in this struct
LL | where
LL |     A<N>: Bar<N>;
   |           ^^^^^^ required by this bound in `A`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
---
16 
17 error: constant expression depends on a generic parameter
+   --> $DIR/sneaky-array-repeat-expr.rs:11:5
+    |
+ 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];

30    |
31    = note: this may fail depending on what value the parameter takes
32 
- error: aborting due to 4 previous errors
+ error: constant expression depends on a generic parameter
+   --> $DIR/sneaky-array-repeat-expr.rs:26:5
+    |
+ LL |     let bar2 = [(); <()>::Assoc2];
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: this may fail depending on what value the parameter takes
+ 
+ error: aborting due to 6 previous errors
---
-   --> /checkout/tests/ui/const-generics/sneaky-array-repeat-expr.rs:11:5
-   --> /checkout/tests/ui/const-generics/sneaky-array-repeat-expr.rs:26:5
+   --> $DIR/sneaky-array-repeat-expr.rs:11:5
+    |
+ LL |     let bar = [(); <()>::Assoc];
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: this may fail depending on what value the parameter takes
+ 
+ error: constant expression depends on a generic parameter
+ error: constant expression depends on a generic parameter
+   --> $DIR/sneaky-array-repeat-expr.rs:26:5
+    |
+ LL |     let bar2 = [(); <()>::Assoc2];
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: this may fail depending on what value the parameter takes
+ 
+ error: aborting due to 6 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" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
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: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
##[error]  --> /checkout/tests/ui/const-generics/sneaky-array-repeat-expr.rs:11:5
   |
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: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/const-generics/sneaky-array-repeat-expr.rs:26:16
   |
LL |     let bar2 = [(); <()>::Assoc2];
   |                ^^^^^^^^^^^^^^^^^^
   |
   = 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:5
   |
LL |     let bar2 = [(); <()>::Assoc2];
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

error: aborting due to 6 previous errors
---
- error: aborting due to 2 previous errors
+ error: constant expression depends on a generic parameter
+   --> $DIR/issue-50439.rs:25:9
+    |
+ 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 3 previous errors
---
-   --> /checkout/tests/ui/consts/issue-50439.rs:25:9
+ error: constant expression depends on a generic parameter
+   --> $DIR/issue-50439.rs:25:9
+    |
+ 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 3 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" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
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: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/consts/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: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/consts/issue-50439.rs:25:9
   |
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 3 previous errors
---
- error: aborting due to 3 previous errors
+ error[E0277]: the size for values of type `T` cannot be known at compilation time
+   --> $DIR/assoc_type_bounds_sized_used.rs:11:5
+    |
+ LL | fn bop<T: Bop + ?Sized>() {
+    |        - this type parameter needs to be `Sized`
+ LL |     let _ = <T as Bop>::Bar::default();
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+    |
+ note: required by a bound in `Bop::Bar`
+   --> $DIR/assoc_type_bounds_sized_used.rs:7:15
+    |
+ LL |     type Bar: Default
+    |          --- required by a bound in this associated type
+ LL |     where
+ LL |         Self: Sized;
+    |               ^^^^^ required by this bound in `Bop::Bar`
+ help: consider removing the `?Sized` bound to make the type parameter `Sized`
+    |
+ LL - fn bop<T: Bop + ?Sized>() {
+ LL + fn bop<T: Bop>() {
+    |
+ help: consider relaxing the implicit `Sized` restriction
+    |
+ LL |     type Bar: Default + ?Sized
+    |                       ++++++++
+ 
+ error: aborting due to 4 previous errors
80 
81 For more information about this error, try `rustc --explain E0277`.
---
-   --> /checkout/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs:7:15
+ error[E0277]: the size for values of type `T` cannot be known at compilation time
+   --> $DIR/assoc_type_bounds_sized_used.rs:11:5
+    |
+ LL | fn bop<T: Bop + ?Sized>() {
+    |        - this type parameter needs to be `Sized`
+ LL |     let _ = <T as Bop>::Bar::default();
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+    |
+ note: required by a bound in `Bop::Bar`
+   --> $DIR/assoc_type_bounds_sized_used.rs:7:15
+    |
+ LL |     type Bar: Default
+    |          --- required by a bound in this associated type
+ LL |     where
+ LL |         Self: Sized;
+    |               ^^^^^ required by this bound in `Bop::Bar`
+ help: consider removing the `?Sized` bound to make the type parameter `Sized`
+    |
+ LL - fn bop<T: Bop + ?Sized>() {
+ LL + fn bop<T: Bop>() {
+    |
+ help: consider relaxing the implicit `Sized` restriction
+    |
+ LL |     type Bar: Default + ?Sized
+    |                       ++++++++
+ 
+ error: aborting due to 4 previous errors


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 dyn-compatibility/assoc_type_bounds_sized_used.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/dyn-compatibility/assoc_type_bounds_sized_used.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/dyn-compatibility/assoc_type_bounds_sized_used" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the size for values of type `T` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs:11:14
   |
LL | fn bop<T: Bop + ?Sized>() {
   |        - this type parameter needs to be `Sized`
LL |     let _ = <T as Bop>::Bar::default();
   |              ^ doesn't have a size known at compile-time
   |
note: required by a bound in `Bop::Bar`
  --> /checkout/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs:7:15
   |
LL |     type Bar: Default
   |          --- required by a bound in this associated type
LL |     where
LL |         Self: Sized;
   |               ^^^^^ required by this bound in `Bop::Bar`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn bop<T: Bop + ?Sized>() {
LL + fn bop<T: Bop>() {
   |
help: consider relaxing the implicit `Sized` restriction
   |
LL |     type Bar: Default + ?Sized
   |                       ++++++++

error[E0277]: the size for values of type `T` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs:11:13
   |
LL | fn bop<T: Bop + ?Sized>() {
   |        - this type parameter needs to be `Sized`
LL |     let _ = <T as Bop>::Bar::default();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
note: required by a bound in `Bop::Bar`
  --> /checkout/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs:7:15
   |
LL |     type Bar: Default
   |          --- required by a bound in this associated type
LL |     where
LL |         Self: Sized;
   |               ^^^^^ required by this bound in `Bop::Bar`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn bop<T: Bop + ?Sized>() {
LL + fn bop<T: Bop>() {
   |
help: consider relaxing the implicit `Sized` restriction
   |
LL |     type Bar: Default + ?Sized
   |                       ++++++++

error[E0277]: the size for values of type `T` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs:11:13
   |
LL | fn bop<T: Bop + ?Sized>() {
   |        - this type parameter needs to be `Sized`
LL |     let _ = <T as Bop>::Bar::default();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
note: required by a bound in `Bop::Bar`
  --> /checkout/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs:7:15
   |
LL |     type Bar: Default
   |          --- required by a bound in this associated type
LL |     where
LL |         Self: Sized;
   |               ^^^^^ required by this bound in `Bop::Bar`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn bop<T: Bop + ?Sized>() {
LL + fn bop<T: Bop>() {
   |
help: consider relaxing the implicit `Sized` restriction
   |
LL |     type Bar: Default + ?Sized
   |                       ++++++++

error[E0277]: the size for values of type `T` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs:11:5
   |
LL | fn bop<T: Bop + ?Sized>() {
   |        - this type parameter needs to be `Sized`
LL |     let _ = <T as Bop>::Bar::default();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
note: required by a bound in `Bop::Bar`
  --> /checkout/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs:7:15
   |
LL |     type Bar: Default
   |          --- required by a bound in this associated type
LL |     where
LL |         Self: Sized;
   |               ^^^^^ required by this bound in `Bop::Bar`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
   |
LL - fn bop<T: Bop + ?Sized>() {
LL + fn bop<T: Bop>() {
   |
help: consider relaxing the implicit `Sized` restriction
   |
LL |     type Bar: Default + ?Sized
   |                       ++++++++
---
---- [ui] tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self/undispatchable-receiver-and-wc-references-Self.stderr`
diff of stderr:

34 LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
35    |                      ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on
36 
- error: aborting due to 2 previous errors
+ error[E0038]: the trait `Fetcher` is not dyn compatible
+   --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:25:5
+    |
+ LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
+    |                      ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self`
+ ...
+ LL |     let fetcher = fetcher();
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^ `Fetcher` 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/undispatchable-receiver-and-wc-references-Self.rs:11:22
+    |
+ LL | pub trait Fetcher: Send + Sync {
+    |           ------- this trait is not dyn compatible...
+ LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
+    |                      ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on
+ 
+ error: aborting due to 3 previous errors
38 
39 For more information about this error, try `rustc --explain E0038`.
40 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs:25:5
-   --> /checkout/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs:11:22
+ error[E0038]: the trait `Fetcher` is not dyn compatible
+   --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:25:5
+    |
+ LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
+    |                      ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self`
+ ...
+ LL |     let fetcher = fetcher();
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^ `Fetcher` 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/undispatchable-receiver-and-wc-references-Self.rs:11:22
+    |
+ LL | pub trait Fetcher: Send + Sync {
+    |           ------- this trait is not dyn compatible...
+ LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
+    |                      ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on
+ 
+ error: aborting due to 3 previous errors


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 dyn-compatibility/undispatchable-receiver-and-wc-references-Self.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/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.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/dyn-compatibility/undispatchable-receiver-and-wc-references-Self" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--crate-type=lib"
stdout: none
--- stderr -------------------------------
error[E0038]: the trait `Fetcher` is not dyn compatible
##[error]  --> /checkout/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs:19:21
   |
LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
   |                      ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self`
...
LL | fn fetcher() -> Box<dyn Fetcher> {
   |                     ^^^^^^^^^^^ `Fetcher` 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/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs:11:22
   |
LL | pub trait Fetcher: Send + Sync {
   |           ------- this trait is not dyn compatible...
LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
   |                      ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on

error[E0038]: the trait `Fetcher` is not dyn compatible
##[error]  --> /checkout/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs:25:19
   |
LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
   |                      ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self`
...
LL |     let fetcher = fetcher();
   |                   ^^^^^^^^^ `Fetcher` 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/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs:11:22
   |
LL | pub trait Fetcher: Send + Sync {
   |           ------- this trait is not dyn compatible...
LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
   |                      ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on

error[E0038]: the trait `Fetcher` is not dyn compatible
##[error]  --> /checkout/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs:25:5
   |
LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
   |                      ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self`
...
LL |     let fetcher = fetcher();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^ `Fetcher` 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/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs:11:22
   |
LL | pub trait Fetcher: Send + Sync {
   |           ------- this trait is not dyn compatible...
LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
   |                      ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0038`.
------------------------------------------
---
- error: aborting due to 1 previous error
+ error[E0038]: the trait `Foo` is not dyn compatible
+   --> $DIR/feature-gate-async-fn-in-dyn-trait.rs:7:26
+    |
+ LL | async fn takes_dyn_trait(x: &dyn Foo) {
+    |                          ^ `Foo` 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/feature-gate-async-fn-in-dyn-trait.rs:4:14
+    |
---
-   --> /checkout/tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.rs:4:14
+ error[E0038]: the trait `Foo` is not dyn compatible
+   --> $DIR/feature-gate-async-fn-in-dyn-trait.rs:7:26
+    |
+ LL | async fn takes_dyn_trait(x: &dyn Foo) {
+    |                          ^ `Foo` 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/feature-gate-async-fn-in-dyn-trait.rs:4:14
+    |
---
To only update this specific test, also pass `--test-args feature-gates/feature-gate-async-fn-in-dyn-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/feature-gates/feature-gate-async-fn-in-dyn-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/feature-gates/feature-gate-async-fn-in-dyn-trait" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2021"
stdout: none
--- stderr -------------------------------
error[E0038]: the trait `Foo` is not dyn compatible
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.rs:7:30
   |
LL | async fn takes_dyn_trait(x: &dyn Foo) {
   |                              ^^^^^^^ `Foo` 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/feature-gates/feature-gate-async-fn-in-dyn-trait.rs:4:14
   |
---

error[E0038]: the trait `Foo` is not dyn compatible
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.rs:7:26
   |
LL | async fn takes_dyn_trait(x: &dyn Foo) {
   |                          ^ `Foo` 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/feature-gates/feature-gate-async-fn-in-dyn-trait.rs:4:14
   |
---
diff of stderr:

- error[E0275]: overflow assigning `Box<_>` to `_`
-   --> $DIR/infinite-autoderef.rs:16:22
+ error[E0275]: overflow evaluating the requirement `Box<_> well-formed`
+   --> $DIR/infinite-autoderef.rs:14:5
3    |
- LL |         x = Box::new(x);
-    |                      ^
+ LL |     let mut x;
+    |     ^^^^^^^^^^
6 
7 error: aborting due to 1 previous error
8 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/infinite/infinite-autoderef.rs:14:5
+ error[E0275]: overflow evaluating the requirement `Box<_> well-formed`
+   --> $DIR/infinite-autoderef.rs:14:5
+ LL |     let mut x;
+    |     ^^^^^^^^^^


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args infinite/infinite-autoderef.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/infinite/infinite-autoderef.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/infinite/infinite-autoderef" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0275]: overflow evaluating the requirement `Box<_> well-formed`
##[error]  --> /checkout/tests/ui/infinite/infinite-autoderef.rs:14:5
   |
LL |     let mut x;
   |     ^^^^^^^^^^

---
- error: aborting due to 1 previous error
+ error: constant expression depends on a generic parameter
+   --> $DIR/const-expr-generic-err2.rs:2:5
+    |
+ LL |     let _ = [0u8; const { std::mem::size_of::<T>() }];
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: this may fail depending on what value the parameter takes
+ 
+ error: aborting due to 2 previous errors
---
-   --> /checkout/tests/ui/inline-const/const-expr-generic-err2.rs:2:5
+ error: constant expression depends on a generic parameter
+   --> $DIR/const-expr-generic-err2.rs:2:5
+    |
+ LL |     let _ = [0u8; const { std::mem::size_of::<T>() }];
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = 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 inline-const/const-expr-generic-err2.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/inline-const/const-expr-generic-err2.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/inline-const/const-expr-generic-err2" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/inline-const/const-expr-generic-err2.rs:2:19
   |
LL |     let _ = [0u8; const { std::mem::size_of::<T>() }];
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/inline-const/const-expr-generic-err2.rs:2:5
   |
LL |     let _ = [0u8; const { std::mem::size_of::<T>() }];
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

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

---- [ui] tests/ui/inline-const/const-expr-generic-err2.rs stdout end ----
---- [ui] tests/ui/issues/issue-29147.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/issues/issue-29147/issue-29147.stderr`
diff of stderr:

12 LL | impl Foo for S5<u64> { fn xxx(&self) {} }
13    | ^^^^^^^^^^^^^^^^^^^^
14 
- error: aborting due to 1 previous error
+ error[E0283]: type annotations needed for `for<'a> fn(&'a S5<_>) {<S5<_> as Foo>::xxx}`
+   --> $DIR/issue-29147.rs:22:9
+    |
+ LL |     let _ = <S5<_>>::xxx;
+    |         ^
+    |
+ note: multiple `impl`s satisfying `S5<_>: Foo` found
+   --> $DIR/issue-29147.rs:18:1
+    |
+ LL | impl Foo for S5<u32> { fn xxx(&self) {} }
+    | ^^^^^^^^^^^^^^^^^^^^
+ LL | impl Foo for S5<u64> { fn xxx(&self) {} }
+    | ^^^^^^^^^^^^^^^^^^^^
+ help: consider giving this pattern a type, where the type for struct `S5<_>` is specified
+    |
+ LL |     let _: for<'a> fn(&'a S5<_>) = <S5<_>>::xxx;
+    |          +++++++++++++++++++++++
+ 
+ error: aborting due to 2 previous errors
16 
17 For more information about this error, try `rustc --explain E0283`.
18 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/issues/issue-29147.rs:22:9
- LL |     let _ = <S5<_>>::xxx; //~ ERROR type annotations needed
-   --> /checkout/tests/ui/issues/issue-29147.rs:18:1
- LL |     let _: for<'a> fn(&'a S5<_>) = <S5<_>>::xxx; //~ ERROR type annotations needed
+ error[E0283]: type annotations needed for `for<'a> fn(&'a S5<_>) {<S5<_> as Foo>::xxx}`
+   --> $DIR/issue-29147.rs:22:9
+    |
+ LL |     let _ = <S5<_>>::xxx;
+    |         ^
+    |
+ note: multiple `impl`s satisfying `S5<_>: Foo` found
+   --> $DIR/issue-29147.rs:18:1
+    |
+ LL | impl Foo for S5<u32> { fn xxx(&self) {} }
+    | ^^^^^^^^^^^^^^^^^^^^
+ LL | impl Foo for S5<u64> { fn xxx(&self) {} }
+    | ^^^^^^^^^^^^^^^^^^^^
+ help: consider giving this pattern a type, where the type for struct `S5<_>` is specified
+    |
+ LL |     let _: for<'a> fn(&'a S5<_>) = <S5<_>>::xxx;
+    |          +++++++++++++++++++++++
+ 
+ error: aborting due to 2 previous errors


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 issues/issue-29147.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/issues/issue-29147.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/issues/issue-29147" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0283]: type annotations needed
##[error]  --> /checkout/tests/ui/issues/issue-29147.rs:22:14
   |
LL |     let _ = <S5<_>>::xxx; //~ ERROR type annotations needed
   |              ^^^^^ cannot infer type for struct `S5<_>`
   |
note: multiple `impl`s satisfying `S5<_>: Foo` found
  --> /checkout/tests/ui/issues/issue-29147.rs:18:1
   |
LL | impl Foo for S5<u32> { fn xxx(&self) {} }
   | ^^^^^^^^^^^^^^^^^^^^
LL | impl Foo for S5<u64> { fn xxx(&self) {} }
   | ^^^^^^^^^^^^^^^^^^^^

error[E0283]: type annotations needed for `for<'a> fn(&'a S5<_>) {<S5<_> as Foo>::xxx}`
##[error]  --> /checkout/tests/ui/issues/issue-29147.rs:22:9
   |
LL |     let _ = <S5<_>>::xxx; //~ ERROR type annotations needed
   |         ^
   |
note: multiple `impl`s satisfying `S5<_>: Foo` found
  --> /checkout/tests/ui/issues/issue-29147.rs:18:1
   |
LL | impl Foo for S5<u32> { fn xxx(&self) {} }
   | ^^^^^^^^^^^^^^^^^^^^
LL | impl Foo for S5<u64> { fn xxx(&self) {} }
   | ^^^^^^^^^^^^^^^^^^^^
help: consider giving this pattern a type, where the type for struct `S5<_>` is specified
   |
LL |     let _: for<'a> fn(&'a S5<_>) = <S5<_>>::xxx; //~ ERROR type annotations needed
   |          +++++++++++++++++++++++

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0283`.
---
diff of stderr:

51    = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
52 
53 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:5
+    |
+ 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`
+ 
+ error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied
54   --> $DIR/iter-macro-not-async-closure.rs:30:5
55    |
56 LL |     x.poll(&mut Context::from_waker(Waker::noop()));

62 LL | async fn call_async_once(f: impl AsyncFnOnce()) {
63    |                                  ^^^^^^^^^^^^^ required by this bound in `call_async_once`
64 
- error: aborting due to 5 previous errors
+ error: aborting due to 7 previous errors
66 
67 For more information about this error, try `rustc --explain E0277`.
68 

Note: some mismatched output was normalized before being compared
-    |             ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@fake-test-src-base/iterators/iter-macro-not-async-closure.rs:19:21: 19:28}`
-   --> fake-test-src-base/iterators/iter-macro-not-async-closure.rs:14:34
- 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
-   --> fake-test-src-base/iterators/iter-macro-not-async-closure.rs:25:5
-    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@fake-test-src-base/iterators/iter-macro-not-async-closure.rs:19:21: 19:28}`
-   --> fake-test-src-base/iterators/iter-macro-not-async-closure.rs:14:34
- 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
-   --> fake-test-src-base/iterators/iter-macro-not-async-closure.rs:30:5
+   --> $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:5
+    |
+ 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`
+ 
+ error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied
+ error: aborting due to 7 previous errors


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 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" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=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()) {
   |                                  ^^^^^^^^^^^^^ 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:13
   |
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()) {
   |                                  ^^^^^^^^^^^^^ 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@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:13
   |
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()) {
   |                                  ^^^^^^^^^^^^^ 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@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:13
   |
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()) {
   |                                  ^^^^^^^^^^^^^ 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@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:5
   |
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()) {
   |                                  ^^^^^^^^^^^^^ 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:30:5
   |
LL |     x.poll(&mut Context::from_waker(Waker::noop()));
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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()) {
---
---- [ui] tests/ui/lifetimes/could-not-resolve-issue-121503.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/lifetimes/could-not-resolve-issue-121503/could-not-resolve-issue-121503.stderr`
diff of stderr:

9    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10    = 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>`
11 
- error: aborting due to 1 previous error
+ error[E0277]: the trait bound `impl FnMut(&mut Self): Allocator` is not satisfied
+   --> $DIR/could-not-resolve-issue-121503.rs:6:29
+    |
+ LL |     async fn box_ref_Struct(self: Box<Self, impl FnMut(&mut Self)>) -> &u32 {
+    |                             ^^^^ the trait `Allocator` is not implemented for `impl FnMut(&mut Self)`
+    |
+ note: required by a bound in `Box`
+   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+ help: consider restricting opaque type `impl FnMut(&mut Self)` with unstable trait `Allocator`
+    |
+ LL |     async fn box_ref_Struct(self: Box<Self, impl FnMut(&mut Self) + std::alloc::Allocator>) -> &u32 {
+    |                                                                   +++++++++++++++++++++++
13 
- For more information about this error, try `rustc --explain E0658`.
+ error: aborting due to 2 previous errors
+ 
---
-   --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:231:1
+ error[E0277]: the trait bound `impl FnMut(&mut Self): Allocator` is not satisfied
+   --> $DIR/could-not-resolve-issue-121503.rs:6:29
+    |
+ LL |     async fn box_ref_Struct(self: Box<Self, impl FnMut(&mut Self)>) -> &u32 {
+    |                             ^^^^ the trait `Allocator` is not implemented for `impl FnMut(&mut Self)`
+    |
+ note: required by a bound in `Box`
+   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+ help: consider restricting opaque type `impl FnMut(&mut Self)` with unstable trait `Allocator`
+    |
+ LL |     async fn box_ref_Struct(self: Box<Self, impl FnMut(&mut Self) + std::alloc::Allocator>) -> &u32 {
+    |                                                                   +++++++++++++++++++++++
+ error: aborting due to 2 previous errors
+ 
+ Some errors have detailed explanations: E0277, E0658.
+ For more information about an error, try `rustc --explain E0277`.
---
To only update this specific test, also pass `--test-args lifetimes/could-not-resolve-issue-121503.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/lifetimes/could-not-resolve-issue-121503.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/lifetimes/could-not-resolve-issue-121503" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018"
stdout: none
--- stderr -------------------------------
error[E0658]: `Box<Struct, impl FnMut(&mut Self)>` cannot be used as the type of `self` without the `arbitrary_self_types` feature
##[error]  --> /checkout/tests/ui/lifetimes/could-not-resolve-issue-121503.rs:6:35
   |
LL |     async fn box_ref_Struct(self: Box<Self, impl FnMut(&mut Self)>) -> &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[E0277]: the trait bound `impl FnMut(&mut Self): Allocator` is not satisfied
##[error]  --> /checkout/tests/ui/lifetimes/could-not-resolve-issue-121503.rs:6:29
   |
LL |     async fn box_ref_Struct(self: Box<Self, impl FnMut(&mut Self)>) -> &u32 {
   |                             ^^^^ the trait `Allocator` is not implemented for `impl FnMut(&mut Self)`
   |
note: required by a bound in `Box`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:231:1
help: consider restricting opaque type `impl FnMut(&mut Self)` with unstable trait `Allocator`
   |
LL |     async fn box_ref_Struct(self: Box<Self, impl FnMut(&mut Self) + std::alloc::Allocator>) -> &u32 {
   |                                                                   +++++++++++++++++++++++

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0658.
---
---- [ui] tests/ui/methods/bad-wf-when-selecting-method.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/methods/bad-wf-when-selecting-method/bad-wf-when-selecting-method.stderr`
diff of stderr:

32 LL | fn test<T: Wf>(t: T) {
33    |          ++++
34 
- error[E0599]: the method `needs_sized` exists for struct `Wrapper<T, _>`, but its trait bounds were not satisfied
+ error[E0599]: no method named `needs_sized` found for struct `Wrapper<T, U>` in the current scope
36   --> $DIR/bad-wf-when-selecting-method.rs:12:16
37    |
38 LL | struct Wrapper<T: Wf<Assoc = U>, U>(T);

39    | ----------------------------------- method `needs_sized` not found for this struct
40 ...
41 LL |     Wrapper(t).needs_sized();
-    |                ^^^^^^^^^^^ method cannot be called on `Wrapper<T, _>` due to unsatisfied trait bounds
+    |                ^^^^^^^^^^^ method not found in `Wrapper<T, _>`
43    |
-    = note: the following trait bounds were not satisfied:
-            `T: Wf`
- help: consider restricting the type parameter to satisfy the trait bound
+    = help: items from traits can only be used if the trait is implemented and in scope
---
To only update this specific test, also pass `--test-args methods/bad-wf-when-selecting-method.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/methods/bad-wf-when-selecting-method.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/methods/bad-wf-when-selecting-method" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `T: Wf` is not satisfied
##[error]  --> /checkout/tests/ui/methods/bad-wf-when-selecting-method.rs:12:13
   |
LL |     Wrapper(t).needs_sized();
   |     ------- ^ the trait `Wf` is not implemented for `T`
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `Wrapper`
  --> /checkout/tests/ui/methods/bad-wf-when-selecting-method.rs:5:19
   |
LL | struct Wrapper<T: Wf<Assoc = U>, U>(T);
   |                   ^^^^^^^^^^^^^ required by this bound in `Wrapper`
help: consider restricting type parameter `T` with trait `Wf`
   |
LL | fn test<T: Wf>(t: T) {
   |          ++++

error[E0277]: the trait bound `T: Wf` is not satisfied
##[error]  --> /checkout/tests/ui/methods/bad-wf-when-selecting-method.rs:12:5
   |
LL |     Wrapper(t).needs_sized();
   |     ^^^^^^^^^^ the trait `Wf` is not implemented for `T`
   |
note: required by a bound in `Wrapper`
  --> /checkout/tests/ui/methods/bad-wf-when-selecting-method.rs:5:19
   |
LL | struct Wrapper<T: Wf<Assoc = U>, U>(T);
   |                   ^^^^^^^^^^^^^ required by this bound in `Wrapper`
help: consider restricting type parameter `T` with trait `Wf`
   |
LL | fn test<T: Wf>(t: T) {
   |          ++++

error[E0599]: no method named `needs_sized` found for struct `Wrapper<T, U>` in the current scope
##[error]  --> /checkout/tests/ui/methods/bad-wf-when-selecting-method.rs:12:16
   |
LL | struct Wrapper<T: Wf<Assoc = U>, U>(T);
   | ----------------------------------- method `needs_sized` not found for this struct
...
LL |     Wrapper(t).needs_sized();
   |                ^^^^^^^^^^^ method not found in `Wrapper<T, _>`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
note: `Trait` defines an item `needs_sized`, perhaps you need to implement it
  --> /checkout/tests/ui/methods/bad-wf-when-selecting-method.rs:7:1
   |
---
diff of stderr:

41   --> $DIR/missing-closing-angle-bracket-eq-constraint.rs:7:7
42    |
43 LL |   let v : Vec<(u32,_) = vec![];
-    |       ^                 ------ type must be known at this point
+    |       ^
45    |
46 help: consider giving `v` an explicit type, where the placeholders `_` are specified
47    |

52   --> $DIR/missing-closing-angle-bracket-eq-constraint.rs:18:7
53    |
54 LL |   let v : Vec<'a = vec![];
-    |       ^            ------ type must be known at this point
+    |       ^
56    |
57 help: consider giving `v` an explicit type, where the placeholders `_` are specified
58    |


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 parser/missing-closing-angle-bracket-eq-constraint.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/parser/missing-closing-angle-bracket-eq-constraint.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/parser/missing-closing-angle-bracket-eq-constraint" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: expected one of `,`, `:`, or `>`, found `=`
##[error]  --> /checkout/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.rs:7:23
   |
LL |   let v : Vec<(u32,_) = vec![];
   |         -             ^ expected one of `,`, `:`, or `>`
   |         |
   |         while parsing the type for `v`
   |
help: you might have meant to end the type parameters here
   |
LL |   let v : Vec<(u32,_)> = vec![];
   |                      +

error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `{`
##[error]  --> /checkout/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.rs:13:32
   |
LL |   let foo : Foo::<T1, T2 = Foo {_a : arg1, _b : arg2};
   |           -                    ^ expected one of 7 possible tokens
   |           |
   |           while parsing the type for `foo`
   |
help: you might have meant to end the type parameters here
   |
LL |   let foo : Foo::<T1>, T2 = Foo {_a : arg1, _b : arg2};
   |                     +

error: expected one of `,`, `:`, or `>`, found `=`
##[error]  --> /checkout/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.rs:18:18
   |
LL |   let v : Vec<'a = vec![];
   |         -        ^ expected one of `,`, `:`, or `>`
   |         |
   |         while parsing the type for `v`
   |
help: you might have meant to end the type parameters here
   |
LL |   let v : Vec<'a> = vec![];
   |                 +

error[E0282]: type annotations needed for `Vec<_>`
##[error]  --> /checkout/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.rs:7:7
   |
LL |   let v : Vec<(u32,_) = vec![];
   |       ^
   |
help: consider giving `v` an explicit type, where the placeholders `_` are specified
   |
LL |   let v: Vec<_> : Vec<(u32,_) = vec![];
   |        ++++++++

error[E0282]: type annotations needed for `Vec<_>`
##[error]  --> /checkout/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.rs:18:7
   |
LL |   let v : Vec<'a = vec![];
   |       ^
   |
help: consider giving `v` an explicit type, where the placeholders `_` are specified
   |
LL |   let v: Vec<_> : Vec<'a = vec![];
   |        ++++++++

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0282`.
---
23 note: required by an implicit `Sized` bound in `std::ops::RangeFrom`
24   --> $SRC_DIR/core/src/ops/range.rs:LL:COL
25 
- error: aborting due to 3 previous errors
+ error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time
+   --> $DIR/range-1.rs:14:5
+    |
+ LL |     let range = *arr..;
+    |     ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+    |
+    = help: the trait `Sized` is not implemented for `[{integer}]`
+ note: required by an implicit `Sized` bound in `std::ops::RangeFrom`
+   --> $SRC_DIR/core/src/ops/range.rs:LL:COL
+ 
+ error: aborting due to 4 previous errors
27 
28 Some errors have detailed explanations: E0277, E0308.
29 For more information about an error, try `rustc --explain E0277`.

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/range/range-1.rs:14:5
-   --> /rustc/FAKE_PREFIX/library/core/src/ops/range.rs:189:1
+ error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time
+   --> $DIR/range-1.rs:14:5
+    |
+ LL |     let range = *arr..;
+    |     ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+    |
+    = help: the trait `Sized` is not implemented for `[{integer}]`
+ note: required by an implicit `Sized` bound in `std::ops::RangeFrom`
+   --> $SRC_DIR/core/src/ops/range.rs:LL:COL
+ 
+ error: aborting due to 4 previous errors


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 range/range-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/range/range-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/range/range-1" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/range/range-1.rs:5:19
   |
LL |     let _ = 0u32..10i32;
   |                   ^^^^^ expected `u32`, found `i32`

error[E0277]: the trait bound `bool: Step` is not satisfied
##[error]  --> /checkout/tests/ui/range/range-1.rs:9:14
   |
LL |     for i in false..true {}
   |              ^^^^^^^^^^^ the trait `Step` is not implemented for `bool`
   |
   = note: required for `std::ops::Range<bool>` to implement `Iterator`
   = note: required for `std::ops::Range<bool>` to implement `IntoIterator`

error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/range/range-1.rs:14:17
   |
LL |     let range = *arr..;
   |                 ^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[{integer}]`
note: required by an implicit `Sized` bound in `std::ops::RangeFrom`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/range.rs:189:1

error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/range/range-1.rs:14:5
   |
LL |     let range = *arr..;
   |     ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[{integer}]`
note: required by an implicit `Sized` bound in `std::ops::RangeFrom`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/range.rs:189:1

error: aborting due to 4 previous errors

---
- error: aborting due to 1 previous error
+ error[E0277]: the trait bound `NoClone: Clone` is not satisfied
+   --> $DIR/struct-path-alias-bounds.rs:9:5
+    |
+ LL |     let s = A { a: NoClone };
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `NoClone`
+    |
+ note: required by a bound in `S`
+   --> $DIR/struct-path-alias-bounds.rs:3:13
+    |
+ LL | struct S<T: Clone> { a: T }
+    |             ^^^^^ required by this bound in `S`
+ help: consider annotating `NoClone` with `#[derive(Clone)]`
+    |
+ LL + #[derive(Clone)]
+ LL | struct NoClone;
+    |
+ 
---
-   --> /checkout/tests/ui/structs/struct-path-alias-bounds.rs:3:13
+ error[E0277]: the trait bound `NoClone: Clone` is not satisfied
+   --> $DIR/struct-path-alias-bounds.rs:9:5
+    |
+ LL |     let s = A { a: NoClone };
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `NoClone`
+    |
+ note: required by a bound in `S`
+   --> $DIR/struct-path-alias-bounds.rs:3:13
+    |
+ LL | struct S<T: Clone> { a: T }
+    |             ^^^^^ required by this bound in `S`
+ help: consider annotating `NoClone` with `#[derive(Clone)]`
+    |
+ LL + #[derive(Clone)]
+ LL | struct NoClone;
+    |
+ 
---
To only update this specific test, also pass `--test-args structs/struct-path-alias-bounds.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/struct-path-alias-bounds.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/struct-path-alias-bounds" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `NoClone: Clone` is not satisfied
##[error]  --> /checkout/tests/ui/structs/struct-path-alias-bounds.rs:9:13
   |
LL |     let s = A { a: NoClone };
   |             ^ the trait `Clone` is not implemented for `NoClone`
   |
note: required by a bound in `S`
  --> /checkout/tests/ui/structs/struct-path-alias-bounds.rs:3:13
   |
LL | struct S<T: Clone> { a: T }
   |             ^^^^^ required by this bound in `S`
help: consider annotating `NoClone` with `#[derive(Clone)]`
   |
LL + #[derive(Clone)]
LL | struct NoClone;
   |

error[E0277]: the trait bound `NoClone: Clone` is not satisfied
##[error]  --> /checkout/tests/ui/structs/struct-path-alias-bounds.rs:9:5
   |
LL |     let s = A { a: NoClone };
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `NoClone`
   |
note: required by a bound in `S`
  --> /checkout/tests/ui/structs/struct-path-alias-bounds.rs:3:13
   |
LL | struct S<T: Clone> { a: T }
   |             ^^^^^ required by this bound in `S`
help: consider annotating `NoClone` with `#[derive(Clone)]`
   |
LL + #[derive(Clone)]
LL | struct NoClone;
   |

---
---- [ui] tests/ui/suggestions/mut-borrow-needed-by-trait.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/suggestions/mut-borrow-needed-by-trait/mut-borrow-needed-by-trait.stderr`
diff of stderr:

35            `&dyn std::io::Write: std::io::Write`
36            which is required by `BufWriter<&dyn std::io::Write>: std::io::Write`
37 
- error: aborting due to 3 previous errors
+ error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied
+   --> $DIR/mut-borrow-needed-by-trait.rs:17:5
+    |
+ LL |     let fp = BufWriter::new(fp);
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
+    |
+    = note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
+ note: required by a bound in `BufWriter`
+   --> $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
+ 
---
-   --> /rustc/FAKE_PREFIX/library/std/src/io/buffered/bufwriter.rs:67:1
+ error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied
+   --> $DIR/mut-borrow-needed-by-trait.rs:17:5
+    |
+ LL |     let fp = BufWriter::new(fp);
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
+    |
+    = note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
+ note: required by a bound in `BufWriter`
+   --> $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
+ 
---
To only update this specific test, also pass `--test-args suggestions/mut-borrow-needed-by-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/suggestions/mut-borrow-needed-by-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/suggestions/mut-borrow-needed-by-trait" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied
##[error]  --> /checkout/tests/ui/suggestions/mut-borrow-needed-by-trait.rs:17:29
   |
LL |     let fp = BufWriter::new(fp);
   |              -------------- ^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
   |              |
   |              required by a bound introduced by this call
   |
   = note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
note: required by a bound in `BufWriter::<W>::new`
  --> /rustc/FAKE_PREFIX/library/std/src/io/buffered/bufwriter.rs:93:5

error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied
##[error]  --> /checkout/tests/ui/suggestions/mut-borrow-needed-by-trait.rs:17:14
   |
LL |     let fp = BufWriter::new(fp);
   |              ^^^^^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
   |
   = note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
note: required by a bound in `BufWriter`
  --> /rustc/FAKE_PREFIX/library/std/src/io/buffered/bufwriter.rs:67:1

error[E0599]: the method `write_fmt` exists for struct `BufWriter<&dyn std::io::Write>`, but its trait bounds were not satisfied
##[error]  --> /checkout/tests/ui/suggestions/mut-borrow-needed-by-trait.rs:21:14
   |
LL |     writeln!(fp, "hello world").unwrap(); //~ ERROR the method
   |     ---------^^---------------- method cannot be called on `BufWriter<&dyn std::io::Write>` due to unsatisfied trait bounds
   |
note: must implement `io::Write`, `fmt::Write`, or have a `write_fmt` method
  --> /checkout/tests/ui/suggestions/mut-borrow-needed-by-trait.rs:21:14
   |
LL |     writeln!(fp, "hello world").unwrap(); //~ ERROR the method
   |              ^^
   = note: the following trait bounds were not satisfied:
           `&dyn std::io::Write: std::io::Write`
           which is required by `BufWriter<&dyn std::io::Write>: std::io::Write`

error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied
##[error]  --> /checkout/tests/ui/suggestions/mut-borrow-needed-by-trait.rs:17:5
   |
LL |     let fp = BufWriter::new(fp);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
   |
   = note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
note: required by a bound in `BufWriter`
  --> /rustc/FAKE_PREFIX/library/std/src/io/buffered/bufwriter.rs:67:1

---
To only update this specific test, also pass `--test-args trait-bounds/enum-unit-variant-trait-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/trait-bounds/enum-unit-variant-trait-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/trait-bounds/enum-unit-variant-trait-bound" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/trait-bounds/enum-unit-variant-trait-bound.rs:4:22
   |
---
To only update this specific test, also pass `--test-args traits/bound/on-structs-and-enums-locals.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/bound/on-structs-and-enums-locals.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/bound/on-structs-and-enums-locals" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `{integer}: Trait` is not satisfied
##[error]  --> /checkout/tests/ui/traits/bound/on-structs-and-enums-locals.rs:11:12
   |
---

error[E0277]: the trait bound `usize: Trait` is not satisfied
##[error]  --> /checkout/tests/ui/traits/bound/on-structs-and-enums-locals.rs:15:14
   |
LL |     let baz: Foo<usize> = loop { };
   |              ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
   |
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/traits/bound/on-structs-and-enums-locals.rs:1:1
   |
LL | trait Trait {
---
------------------------------------------

---- [ui] tests/ui/traits/bound/on-structs-and-enums-locals.rs stdout end ----
---- [ui] tests/ui/traits/bound/on-structs-and-enums-xc1.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/bound/on-structs-and-enums-xc1/on-structs-and-enums-xc1.stderr`
diff of stderr:

10 LL | pub struct Foo<T:Trait> {
11    |                  ^^^^^ required by this bound in `Foo`
12 
---
13 error[E0277]: the trait bound `f64: Trait` is not satisfied
14   --> $DIR/on-structs-and-enums-xc1.rs:12:14
15    |

22 LL | pub enum Bar<T:Trait> {
23    |                ^^^^^ required by this bound in `Bar`
24 
- error: aborting due to 2 previous errors
+ error[E0277]: the trait bound `f64: Trait` is not satisfied
+   --> $DIR/on-structs-and-enums-xc1.rs:14:5
+    |
+ LL |     let _ = bar;
+    |     ^^^^^^^^^^^^ the trait `Trait` is not implemented for `f64`
+    |
+ note: required by a bound in `Bar`
+   --> $DIR/auxiliary/on_structs_and_enums_xc.rs:9:16
+    |
+ LL | pub enum Bar<T:Trait> {
+    |                ^^^^^ required by this bound in `Bar`
+ 
+ error: aborting due to 4 previous errors
26 
27 For more information about this error, try `rustc --explain E0277`.
28 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/bound/on-structs-and-enums-xc1.rs:8:5
- LL | |     //~^ ERROR E0277
-   --> /checkout/tests/ui/traits/bound/auxiliary/on_structs_and_enums_xc.rs:5:18
-   --> /checkout/tests/ui/traits/bound/on-structs-and-enums-xc1.rs:14:5
-   --> /checkout/tests/ui/traits/bound/auxiliary/on_structs_and_enums_xc.rs:9:16
+ error[E0277]: the trait bound `{integer}: Trait` is not satisfied
+   --> $DIR/on-structs-and-enums-xc1.rs:8:5
+    |
+ LL | /     let foo = Foo {
+ LL | |         x: 3
+ LL | |
+ LL | |     };
---
+    |
+ note: required by a bound in `Bar`
+   --> $DIR/auxiliary/on_structs_and_enums_xc.rs:9:16
+    |
+ LL | pub enum Bar<T:Trait> {
+    |                ^^^^^ required by this bound in `Bar`
+ 
+ error: aborting due to 4 previous errors


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args traits/bound/on-structs-and-enums-xc1.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/bound/on-structs-and-enums-xc1.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/bound/on-structs-and-enums-xc1" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/bound/on-structs-and-enums-xc1/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `{integer}: Trait` is not satisfied
##[error]  --> /checkout/tests/ui/traits/bound/on-structs-and-enums-xc1.rs:9:12
   |
LL |         x: 3
   |            ^ the trait `Trait` is not implemented for `{integer}`
   |
note: required by a bound in `Foo`
  --> /checkout/tests/ui/traits/bound/auxiliary/on_structs_and_enums_xc.rs:5:18
   |
LL | pub struct Foo<T:Trait> {
   |                  ^^^^^ required by this bound in `Foo`

error[E0277]: the trait bound `{integer}: Trait` is not satisfied
---
LL | |     };
   | |______^ the trait `Trait` is not implemented for `{integer}`
   |
note: required by a bound in `Foo`
  --> /checkout/tests/ui/traits/bound/auxiliary/on_structs_and_enums_xc.rs:5:18
   |
LL | pub struct Foo<T:Trait> {
   |                  ^^^^^ required by this bound in `Foo`

error[E0277]: the trait bound `f64: Trait` is not satisfied
##[error]  --> /checkout/tests/ui/traits/bound/on-structs-and-enums-xc1.rs:12:14
   |
LL |     let bar: Bar<f64> = return;
   |              ^^^^^^^^ the trait `Trait` is not implemented for `f64`
   |
note: required by a bound in `Bar`
  --> /checkout/tests/ui/traits/bound/auxiliary/on_structs_and_enums_xc.rs:9:16
   |
LL | pub enum Bar<T:Trait> {
   |                ^^^^^ required by this bound in `Bar`

error[E0277]: the trait bound `f64: Trait` is not satisfied
##[error]  --> /checkout/tests/ui/traits/bound/on-structs-and-enums-xc1.rs:14:5
   |
LL |     let _ = bar;
   |     ^^^^^^^^^^^^ the trait `Trait` is not implemented for `f64`
   |
note: required by a bound in `Bar`
  --> /checkout/tests/ui/traits/bound/auxiliary/on_structs_and_enums_xc.rs:9:16
   |
LL | pub enum Bar<T:Trait> {
   |                ^^^^^ required by this bound in `Bar`

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0277`.
---
+    |
+ LL |     let x;
+    |         ^
+    |
+    = note: multiple `impl`s satisfying `_: Fn()` found in the following crates: `alloc`, `core`:
+            - impl<A, F> Fn<A> for &F
+              where A: Tuple, F: Fn<A>, F: ?Sized;
+            - impl<Args, F, A> Fn<Args> for Box<F, A>
+              where Args: Tuple, F: Fn<Args>, A: Allocator, F: ?Sized;
+            - impl<F, Args> Fn<Args> for Exclusive<F>
+              where F: Sync, F: Fn<Args>, Args: Tuple;
+ note: required by a bound in `Map`
+   --> $DIR/well-formed-in-relate.rs:10:27
+    |
+ LL | struct Map<T, U> where T: Fn() -> U {
+    |                           ^^^^^^^^^ required by this bound in `Map`
+ help: consider giving `x` an explicit type, where the type for type parameter `T` is specified
+    |
+ LL |     let x: Map<T, U>;
+    |          +++++++++++
+ 
+ error: aborting due to 2 previous errors
28 
29 For more information about this error, try `rustc --explain E0283`.
---
+    |
+ LL |     let x;
+    |         ^
+    |
+    = note: multiple `impl`s satisfying `_: Fn()` found in the following crates: `alloc`, `core`:
+            - impl<A, F> Fn<A> for &F
+              where A: Tuple, F: Fn<A>, F: ?Sized;
+            - impl<Args, F, A> Fn<Args> for Box<F, A>
+              where Args: Tuple, F: Fn<Args>, A: Allocator, F: ?Sized;
+            - impl<F, Args> Fn<Args> for Exclusive<F>
+              where F: Sync, F: Fn<Args>, Args: Tuple;
+ note: required by a bound in `Map`
+   --> $DIR/well-formed-in-relate.rs:10:27
+    |
+ LL | struct Map<T, U> where T: Fn() -> U {
+    |                           ^^^^^^^^^ required by this bound in `Map`
+ help: consider giving `x` an explicit type, where the type for type parameter `T` is specified
+    |
+ LL |     let x: Map<T, U>;
+    |          +++++++++++
+ 
+ error: aborting due to 2 previous errors


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args traits/next-solver/well-formed-in-relate.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/well-formed-in-relate.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/well-formed-in-relate" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0283]: type annotations needed for `Map<_, _>`
##[error]  --> /checkout/tests/ui/traits/next-solver/well-formed-in-relate.rs:2:9
   |
LL |     let x;
   |         ^
...
LL |     x = unconstrained_map();
   |         ------------------- type must be known at this point
   |
   = note: multiple `impl`s satisfying `_: Fn()` found in the following crates: `alloc`, `core`:
           - impl<A, F> Fn<A> for &F
             where A: Tuple, F: Fn<A>, F: ?Sized;
           - impl<Args, F, A> Fn<Args> for Box<F, A>
             where Args: Tuple, F: Fn<Args>, A: Allocator, F: ?Sized;
           - impl<F, Args> Fn<Args> for Exclusive<F>
             where F: Sync, F: Fn<Args>, Args: Tuple;
note: required by a bound in `unconstrained_map`
  --> /checkout/tests/ui/traits/next-solver/well-formed-in-relate.rs:21:25
   |
LL | fn unconstrained_map<T: Fn() -> U, U>() -> <Map<T, U> as Mirror>::Assoc { todo!() }
   |                         ^^^^^^^^^ required by this bound in `unconstrained_map`
help: consider giving `x` an explicit type, where the type for type parameter `T` is specified
   |
LL |     let x: Map<T, U>;
   |          +++++++++++

error[E0283]: type annotations needed for `Map<_, _>`
##[error]  --> /checkout/tests/ui/traits/next-solver/well-formed-in-relate.rs:2:9
   |
LL |     let x;
   |         ^
   |
   = note: multiple `impl`s satisfying `_: Fn()` found in the following crates: `alloc`, `core`:
           - impl<A, F> Fn<A> for &F
             where A: Tuple, F: Fn<A>, F: ?Sized;
           - impl<Args, F, A> Fn<Args> for Box<F, A>
             where Args: Tuple, F: Fn<Args>, A: Allocator, F: ?Sized;
           - impl<F, Args> Fn<Args> for Exclusive<F>
             where F: Sync, F: Fn<Args>, Args: Tuple;
note: required by a bound in `Map`
  --> /checkout/tests/ui/traits/next-solver/well-formed-in-relate.rs:10:27
   |
LL | struct Map<T, U> where T: Fn() -> U {
   |                           ^^^^^^^^^ required by this bound in `Map`
help: consider giving `x` an explicit type, where the type for type parameter `T` is specified
   |
LL |     let x: Map<T, U>;
   |          +++++++++++
---
diff of stderr:

- error[E0275]: overflow assigning `_` to `*const _`
-   --> $DIR/subtype-recursion-limit.rs:12:17
+ error[E0275]: overflow evaluating the requirement `*const _ well-formed`
+   --> $DIR/subtype-recursion-limit.rs:12:5
3    |
4 LL |     let mut w = (x, y);
-    |                 ^^^^^^
+    |     ^^^^^^^^^^^^^^^^^^^
6 
7 error: aborting due to 1 previous error
8 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/subtype-recursion-limit.rs:12:5
+ error[E0275]: overflow evaluating the requirement `*const _ well-formed`
+   --> $DIR/subtype-recursion-limit.rs:12:5
+    |     ^^^^^^^^^^^^^^^^^^^


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args traits/subtype-recursion-limit.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/subtype-recursion-limit.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/subtype-recursion-limit" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0275]: overflow evaluating the requirement `*const _ well-formed`
##[error]  --> /checkout/tests/ui/traits/subtype-recursion-limit.rs:12:5
   |
LL |     let mut w = (x, y);
   |     ^^^^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0275`.
---
diff of stderr:

- error[E0275]: overflow assigning `Box<_>` to `_`
-   --> $DIR/direct-self-reference-occurs-check.rs:7:18
+ error[E0275]: overflow evaluating the requirement `Box<_> well-formed`
+   --> $DIR/direct-self-reference-occurs-check.rs:6:5
3    |
- LL |     f = Box::new(f);
-    |                  ^
+ LL |     let f;
+    |     ^^^^^^
6 
7 error: aborting due to 1 previous error
8 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/type-inference/direct-self-reference-occurs-check.rs:6:5
+ error[E0275]: overflow evaluating the requirement `Box<_> well-formed`
+   --> $DIR/direct-self-reference-occurs-check.rs:6:5
+ LL |     let f;
+    |     ^^^^^^


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 type-inference/direct-self-reference-occurs-check.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-inference/direct-self-reference-occurs-check.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-inference/direct-self-reference-occurs-check" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0275]: overflow evaluating the requirement `Box<_> well-formed`
##[error]  --> /checkout/tests/ui/type-inference/direct-self-reference-occurs-check.rs:6:5
   |
LL |     let f;
   |     ^^^^^^

---
---- [ui] tests/ui/type-inference/enum-self-reference-occurs-check.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/type-inference/enum-self-reference-occurs-check/enum-self-reference-occurs-check.stderr`
diff of stderr:

- error[E0275]: overflow assigning `Clam<_>` to `_`
-   --> $DIR/enum-self-reference-occurs-check.rs:11:17
+ error[E0275]: overflow evaluating the requirement `Clam<_> well-formed`
+   --> $DIR/enum-self-reference-occurs-check.rs:10:5
3    |
- LL |     c = Clam::A(c);
-    |                 ^
+ LL |     let c;
+    |     ^^^^^^
6 
7 error: aborting due to 1 previous error
8 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/type-inference/enum-self-reference-occurs-check.rs:10:5
+ error[E0275]: overflow evaluating the requirement `Clam<_> well-formed`
+   --> $DIR/enum-self-reference-occurs-check.rs:10:5
+ LL |     let c;
+    |     ^^^^^^


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 type-inference/enum-self-reference-occurs-check.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-inference/enum-self-reference-occurs-check.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-inference/enum-self-reference-occurs-check" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0275]: overflow evaluating the requirement `Clam<_> well-formed`
##[error]  --> /checkout/tests/ui/type-inference/enum-self-reference-occurs-check.rs:10:5
   |
LL |     let c;
   |     ^^^^^^

---
diff of stderr:

- error[E0275]: overflow assigning `Box<_>` to `_`
-   --> $DIR/infinite-type-occurs-check.rs:9:9
+ error[E0275]: overflow evaluating the requirement `Box<_> well-formed`
+   --> $DIR/infinite-type-occurs-check.rs:6:5
3    |
- LL |     g = f;
-    |         ^
+ LL |     let f;
+    |     ^^^^^^
6 
7 error: aborting due to 1 previous error
8 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/type-inference/infinite-type-occurs-check.rs:6:5
+ error[E0275]: overflow evaluating the requirement `Box<_> well-formed`
+   --> $DIR/infinite-type-occurs-check.rs:6:5
+ LL |     let f;
+    |     ^^^^^^


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 type-inference/infinite-type-occurs-check.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-inference/infinite-type-occurs-check.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-inference/infinite-type-occurs-check" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0275]: overflow evaluating the requirement `Box<_> well-formed`
##[error]  --> /checkout/tests/ui/type-inference/infinite-type-occurs-check.rs:6:5
   |
LL |     let f;
   |     ^^^^^^

---
4 LL |     let x = vec![];
-    |         ^   ------ type must be known at this point
+    |         ^
6    |
7 help: consider giving `x` an explicit type, where the placeholders `_` are specified
8    |


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args type/type-check/cannot_infer_local_or_vec.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/type-check/cannot_infer_local_or_vec.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/type-check/cannot_infer_local_or_vec" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0282]: type annotations needed for `Vec<_>`
##[error]  --> /checkout/tests/ui/type/type-check/cannot_infer_local_or_vec.rs:2:9
   |
LL |     let x = vec![];
   |         ^
   |
help: consider giving `x` an explicit type, where the placeholders `_` are specified
   |
LL |     let x: Vec<_> = vec![];
   |          ++++++++

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0282`.
---
To only update this specific test, also pass `--test-args typeck/point-at-type-param-in-path-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/typeck/point-at-type-param-in-path-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/typeck/point-at-type-param-in-path-expr" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: `()` doesn't implement `std::fmt::Display`
##[error]  --> /checkout/tests/ui/typeck/point-at-type-param-in-path-expr.rs:4:19
   |
---
- error: aborting due to 1 previous error
+ error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
+   --> $DIR/repeat-expr-checks-wf.rs:6:5
+    |
+ LL |     let a = [T::ASSOC; 2];
+    |     ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+    |
+    = help: the trait `Sized` is not implemented for `[u8]`
+    = note: slice and array elements must have `Sized` type
+ 
---
-   --> /checkout/tests/ui/typeck/repeat-expr-checks-wf.rs:6:5
+ error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
+   --> $DIR/repeat-expr-checks-wf.rs:6:5
+    |
+ LL |     let a = [T::ASSOC; 2];
+    |     ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+    |
+    = help: the trait `Sized` is not implemented for `[u8]`
+    = note: slice and array elements must have `Sized` type
+ 
---
To only update this specific test, also pass `--test-args typeck/repeat-expr-checks-wf.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/typeck/repeat-expr-checks-wf.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/typeck/repeat-expr-checks-wf" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/typeck/repeat-expr-checks-wf.rs:6:13
   |
---
---- [ui] tests/ui/union/union-generic.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/union/union-generic/union-generic.stderr`
diff of stderr:

22 LL | union U<T: Copy> {
23    |            ^^^^ required by this bound in `U`
24 
- error: aborting due to 2 previous errors
+ error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
+   --> $DIR/union-generic.rs:10:5
+    |
+ LL |     let u = U::<Rc<u32>> { a: Default::default() };
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Rc<u32>`
+    |
+ note: required by a bound in `U`
+   --> $DIR/union-generic.rs:3:12
+    |
+ LL | union U<T: Copy> {
+    |            ^^^^ required by this bound in `U`
+ 
+ error: aborting due to 3 previous errors
26 
27 For more information about this error, try `rustc --explain E0277`.
28 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/union/union-generic.rs:10:5
-   --> /checkout/tests/ui/union/union-generic.rs:3:12
+ error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
+   --> $DIR/union-generic.rs:10:5
+    |
+ LL |     let u = U::<Rc<u32>> { a: Default::default() };
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Rc<u32>`
+    |
+ note: required by a bound in `U`
+   --> $DIR/union-generic.rs:3:12
+    |
+ LL | union U<T: Copy> {
+    |            ^^^^ required by this bound in `U`
+ 
+ error: aborting due to 3 previous errors


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 union/union-generic.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/union/union-generic.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/union/union-generic" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
##[error]  --> /checkout/tests/ui/union/union-generic.rs:8:13
   |
LL |     let u = U { a: Rc::new(0u32) };
   |             ^ the trait `Copy` is not implemented for `Rc<u32>`
   |
note: required by a bound in `U`
  --> /checkout/tests/ui/union/union-generic.rs:3:12
   |
LL | union U<T: Copy> {
   |            ^^^^ required by this bound in `U`

error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
##[error]  --> /checkout/tests/ui/union/union-generic.rs:10:17
   |
LL |     let u = U::<Rc<u32>> { a: Default::default() };
   |                 ^^^^^^^ the trait `Copy` is not implemented for `Rc<u32>`
   |
note: required by a bound in `U`
  --> /checkout/tests/ui/union/union-generic.rs:3:12
   |
LL | union U<T: Copy> {
   |            ^^^^ required by this bound in `U`

error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
##[error]  --> /checkout/tests/ui/union/union-generic.rs:10:5
   |
LL |     let u = U::<Rc<u32>> { a: Default::default() };
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Rc<u32>`
   |
note: required by a bound in `U`
  --> /checkout/tests/ui/union/union-generic.rs:3:12
   |
LL | union U<T: Copy> {
   |            ^^^^ required by this bound in `U`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
---
127 
128 error[E0277]: the size for values of type `X` cannot be known at compilation time
+   --> $DIR/unsized6.rs:26:5
+    |
+ 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: 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 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
129   --> $DIR/unsized6.rs:26:10
130    |
131 LL | fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {

182    |
183 
184 error[E0277]: the size for values of type `X` cannot be known at compilation time
+   --> $DIR/unsized6.rs:34:5
+    |
+ 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: 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 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
185   --> $DIR/unsized6.rs:34:10
186    |
187 LL | fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {

235 LL | fn g2<X: ?Sized + T>(x: &X) {}
236    |                         +
237 
- error: aborting due to 13 previous errors
+ error: aborting due to 15 previous errors
239 
---
-   --> /checkout/tests/ui/unsized/unsized6.rs:26:5
-   --> /checkout/tests/ui/unsized/unsized6.rs:34:5
+   --> $DIR/unsized6.rs:26:5
+    |
+ 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: 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 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
+   --> $DIR/unsized6.rs:34:5
+    |
+ 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: 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 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: aborting due to 15 previous errors


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 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" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
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 `Z` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/unsized/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) {
   |

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:5
   |
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: 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 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: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:5
   |
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: 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 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: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 15 previous errors

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

@rust-bors
Copy link

rust-bors bot commented Oct 30, 2025

☀️ Try build successful (CI)
Build commit: 41ca225 (41ca225170951d0a76cea948035b46a1275cc7e7, parent: 72fe2ffb391f397efdfafb2216028ed9952e8078)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (41ca225): comparison URL.

Overall result: ❌✅ regressions and improvements - 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.3% [0.1%, 0.5%] 40
Regressions ❌
(secondary)
0.4% [0.1%, 1.2%] 49
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.1%] 3
All ❌✅ (primary) 0.3% [0.1%, 0.5%] 40

Max RSS (memory usage)

Results (primary -0.4%, secondary 0.6%)

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

mean range count
Regressions ❌
(primary)
1.0% [1.0%, 1.0%] 1
Regressions ❌
(secondary)
1.2% [0.7%, 2.6%] 5
Improvements ✅
(primary)
-1.8% [-1.8%, -1.8%] 1
Improvements ✅
(secondary)
-2.5% [-2.5%, -2.5%] 1
All ❌✅ (primary) -0.4% [-1.8%, 1.0%] 2

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: 475.302s -> 476.147s (0.18%)
Artifact size: 390.18 MiB -> 390.21 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 30, 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-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants