Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[experiment] turn on effects everywhere #119083

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

Conversation

fee1-dead
Copy link
Member

no crater run yet, pending the latest bug fixes

@rustbot
Copy link
Collaborator

rustbot commented Dec 18, 2023

r? @spastorino

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 18, 2023
@fee1-dead
Copy link
Member Author

r? @ghost

@rustbot
Copy link
Collaborator

rustbot commented Dec 18, 2023

Failed to set assignee to ghost: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@fee1-dead
Copy link
Member Author

That was a misclick, sorry guys

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Sat Dec 23 14:52:22 UTC 2023
  network time: Sat, 23 Dec 2023 14:52:22 GMT
  network time: Sat, 23 Dec 2023 14:52:22 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-missing-tools', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: rust.codegen-units-std := 1
---
.............................................................................F..........  2728/15986
........................F...............................................................  2816/15986
...........................................F............................................  2904/15986
........................................................................................  2992/15986
................................F.......................................................  3080/15986
.........i.....................F........................................................  3168/15986
.....................................................................FF................F  3256/15986
...............................................................F........................  3344/15986
.............................F.............................................F............  3432/15986
...................F.............................F.......................F...........F..  3520/15986
................F..F..........F.....................F...F......................FF.......  3608/15986
........................................................................................  3784/15986
.....................................................i..................................  3872/15986
.......i................................................................................  3960/15986
........................................................................................  4048/15986
---
...F.................................................................................... 12232/15986
........................................................................................ 12320/15986
........................................................................................ 12408/15986
........................................................................................ 12496/15986
................iiiiiii...i....i.i............F..............F.....FFFF...FF..F.F....... 12584/15986
....F...F......F......F....FF...F..F.FF.FF..F...........F......F....F..............i.... 12672/15986
......ii...........i....iiiiiiiii.i..........i.i........................................ 12848/15986
........................................................................................ 12936/15986
........................................................................................ 13024/15986
........................................................................................ 13112/15986
---
........................................................................................ 14696/15986
........................................................................................ 14784/15986
........................................................................................ 14872/15986
........................................................................................ 14960/15986
.F......F............................................................................... 15048/15986
........................................................................................ 15224/15986
........................................................................................ 15312/15986
........................................................................................ 15400/15986
........................................................................................ 15488/15986
---

---- [ui] tests/ui/check-static-values-constraints.rs stdout ----
diff of stderr:

29    = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
30    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
31 
- error[E0015]: cannot call non-const fn `<str as ToString>::to_string` in statics
-    |
-    |
- LL |     field2: SafeEnum::Variant4("str".to_string()),
-    |
-    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-    = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
42 error[E0010]: allocations are not allowed in statics
43   --> $DIR/check-static-values-constraints.rs:96:5
44    |


158    = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
159    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
- error: aborting due to 17 previous errors
+ error: aborting due to 16 previous errors
162 
163 Some errors have detailed explanations: E0010, E0015, E0493, E0507.
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/check-static-values-constraints.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/check-static-values-constraints" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/check-static-values-constraints/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0493]: destructor of `SafeStruct` cannot be evaluated at compile-time
   |
   |
LL |       ..SafeStruct {
   |  _______^
LL | |         //~^ ERROR destructor of
LL | |         field1: SafeEnum::Variant3(WithDtor),
LL | |         field2: SafeEnum::Variant1,
   | |_____^ the destructor for this type cannot be evaluated in statics
LL |   };
   |   - value is dropped here


error[E0010]: allocations are not allowed in statics
##[error]  --> /checkout/tests/ui/check-static-values-constraints.rs:81:33
   |
LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
   |                                 ^^^^^^^^^^^^^ allocation not allowed in statics
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)


error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
   |
   |
LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0010]: allocations are not allowed in statics
##[error]  --> /checkout/tests/ui/check-static-values-constraints.rs:96:5
   |
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^^^ allocation not allowed in statics
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)


error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
   |
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0010]: allocations are not allowed in statics
##[error]  --> /checkout/tests/ui/check-static-values-constraints.rs:98:5
   |
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^^^ allocation not allowed in statics
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)


error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
   |
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0010]: allocations are not allowed in statics
##[error]  --> /checkout/tests/ui/check-static-values-constraints.rs:103:6
   |
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^^^ allocation not allowed in statics
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)


error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
   |
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0010]: allocations are not allowed in statics
##[error]  --> /checkout/tests/ui/check-static-values-constraints.rs:105:6
   |
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^^^ allocation not allowed in statics
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)


error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
   |
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0010]: allocations are not allowed in statics
##[error]  --> /checkout/tests/ui/check-static-values-constraints.rs:111:31
   |
   |
LL | static STATIC19: Vec<isize> = vec![3];
   |                               ^^^^^^^ allocation not allowed in statics
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)


error[E0015]: cannot call non-const fn `slice::<impl [isize]>::into_vec::<std::alloc::Global>` in statics
   |
   |
LL | static STATIC19: Vec<isize> = vec![3];
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0507]: cannot move out of static item `x`
##[error]  --> /checkout/tests/ui/check-static-values-constraints.rs:119:9
   |
LL |         x
LL |         x
   |         ^ move occurs because `x` has type `Vec<isize>`, which does not implement the `Copy` trait
help: consider borrowing here
   |
LL |         &x
   |         +
   |         +

error[E0010]: allocations are not allowed in statics
##[error]  --> /checkout/tests/ui/check-static-values-constraints.rs:117:32
   |
LL |         static x: Vec<isize> = vec![3]; //~ ERROR allocations are not allowed in statics
   |                                ^^^^^^^ allocation not allowed in statics
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)


error[E0015]: cannot call non-const fn `slice::<impl [isize]>::into_vec::<std::alloc::Global>` in statics
   |
   |
LL |         static x: Vec<isize> = vec![3]; //~ ERROR allocations are not allowed in statics
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 16 previous errors

Some errors have detailed explanations: E0010, E0015, E0493, E0507.
For more information about an error, try `rustc --explain E0010`.
For more information about an error, try `rustc --explain E0010`.
------------------------------------------


---- [ui] tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs stdout ----
diff of stderr:

- error[E0741]: `Foo` must implement `ConstParamTy` to be used as the type of a const generic parameter
-   --> $DIR/unify-op-with-fn-call.rs:18:29
+ error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
3    |
3    |
- LL | struct Evaluatable<const N: Foo>;
+ LL | impl const std::ops::Add for Foo {
+    |            ^^^^^^^^^^^^^
6    |
- help: add `#[derive(ConstParamTy)]` to the struct
- help: add `#[derive(ConstParamTy)]` to the struct
-    |
- LL + #[derive(ConstParamTy)]
- LL | struct Foo(u8);
-    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
12 
- error[E0741]: `Foo` must implement `ConstParamTy` to be used as the type of a const generic parameter
-    |
-    |
- LL | fn foo<const N: Foo>(a: Evaluatable<{ N + N }>) {
-    |
- help: add `#[derive(ConstParamTy)]` to the struct
-    |
-    |
- LL + #[derive(ConstParamTy)]
- LL | struct Foo(u8);
+ error: aborting due to 1 previous error
24 
24 
- error[E0741]: `Foo` must implement `ConstParamTy` to be used as the type of a const generic parameter
-    |
-    |
- LL | fn bar<const N: Foo>() {}
-    |
- help: add `#[derive(ConstParamTy)]` to the struct
-    |
-    |
- LL + #[derive(ConstParamTy)]
- LL | struct Foo(u8);
- 
- error: aborting due to 3 previous errors
- 
- For more information about this error, try `rustc --explain E0741`.
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/generic_const_exprs/unify-op-with-fn-call" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/generic_const_exprs/unify-op-with-fn-call/auxiliary"
stdout: none
--- stderr -------------------------------
error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
   |
LL | impl const std::ops::Add for Foo {
   |            ^^^^^^^^^^^^^
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 1 previous error
------------------------------------------



---- [ui] tests/ui/const-generics/issue-93647.rs stdout ----
diff of stderr:

- error[E0015]: cannot call non-const closure in constants
+ error[E0080]: evaluation of constant value failed
2   --> $DIR/issue-93647.rs:2:5
3    |
4 LL |     (||1usize)()
-    |     ^^^^^^^^^^^^
-    |
-    |
-    = note: closures need an RFC before allowed to be called in constants
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+    |     ^^^^^^^^^^^^ calling non-const function `X::{constant#0}::{closure#0}`
11 error: aborting due to 1 previous error
12 

- For more information about this error, try `rustc --explain E0015`.
---
To only update this specific test, also pass `--test-args const-generics/issue-93647.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/const-generics/issue-93647.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issue-93647" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issue-93647/auxiliary"
--- stderr -------------------------------
error[E0080]: evaluation of constant value failed
##[error]  --> /checkout/tests/ui/const-generics/issue-93647.rs:2:5
   |
   |
LL |     (||1usize)()
   |     ^^^^^^^^^^^^ calling non-const function `X::{constant#0}::{closure#0}`
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0080`.
------------------------------------------
---
-   --> $DIR/issue-90318.rs:14:8
+ error[E0308]: mismatched types
+   --> $DIR/issue-90318.rs:14:10
3    |
4 LL |     If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
-    |        ^^-----------------^^^^^^^^^^^^^^^^^^^^^^^^
-    |          borrowing is not supported in generic constants
-    |          borrowing is not supported in generic constants
+    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
-    = help: consider moving this anonymous constant into a `const` function
-    = note: this operation may be supported in the future
+    = note: expected constant `false`
+               found constant `true`
+               found constant `true`
11 
- error: overly complex generic constant
-   --> $DIR/issue-90318.rs:21:8
+ error[E0308]: mismatched types
+   --> $DIR/issue-90318.rs:21:10
14    |
15 LL |     If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
-    |        ^^-----------------^^^^^^^^^^^^^^^^^^^^^^^^
-    |          borrowing is not supported in generic constants
-    |          borrowing is not supported in generic constants
+    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
-    = help: consider moving this anonymous constant into a `const` function
-    = note: this operation may be supported in the future
+    = note: expected constant `false`
+               found constant `true`
---
To only update this specific test, also pass `--test-args const-generics/issues/issue-90318.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/const-generics/issues/issue-90318.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issues/issue-90318" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issues/issue-90318/auxiliary"
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-90318.rs:14:10
   |
   |
LL |     If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
   = note: expected constant `false`
              found constant `true`

error[E0308]: mismatched types
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-90318.rs:21:10
   |
LL |     If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
   = note: expected constant `false`
              found constant `true`

error: aborting due to 2 previous errors
---
diff of stderr:

- error[E0493]: destructor of `T` cannot be evaluated at compile-time
-   --> $DIR/const-block-const-bound.rs:8:32
+ error[E0277]: can't drop `UnconstDrop`
3    |
3    |
+ LL |         f(UnconstDrop);
+    |         - ^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `UnconstDrop`
+    |         required by a bound introduced by this call
+    |
+    |
+    = note: the trait bound `UnconstDrop: ~const Destruct` is not satisfied
+ note: required by a bound in `f`
+    |
+    |
4 LL | const fn f<T: ~const Destruct>(x: T) {}
-    |                                ^      - value is dropped here
-    |                                the destructor for this type cannot be evaluated in constant functions
+    |               ^^^^^^^^^^^^^^^ required by this bound in `f`
+ help: consider borrowing here
+    |
+    |
+ LL |         f(&UnconstDrop);
+    |           +
+ LL |         f(&mut UnconstDrop);
8 
9 error: aborting due to 1 previous error
10 

---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/const-block-const-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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-block-const-bound" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-block-const-bound/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0277]: can't drop `UnconstDrop`
   |
   |
LL |         f(UnconstDrop);
   |         - ^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `UnconstDrop`
   |         required by a bound introduced by this call
   |
   |
   = note: the trait bound `UnconstDrop: ~const Destruct` is not satisfied
note: required by a bound in `f`
   |
   |
LL | const fn f<T: ~const Destruct>(x: T) {}
   |               ^^^^^^^^^^^^^^^ required by this bound in `f`
   |
   |
LL |         f(&UnconstDrop);
   |           +
LL |         f(&mut UnconstDrop);

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
---
- error: pointers cannot be reliably compared during const eval
+ error[E0308]: mismatched types
2   --> $DIR/const_raw_ptr_ops.rs:4:26
3    |
4 LL | const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 };
-    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
-    = note: see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information
+    = note: expected constant `false`
+               found constant `true`
8 
8 
- error: pointers cannot be reliably compared during const eval
+ error[E0308]: mismatched types
10   --> $DIR/const_raw_ptr_ops.rs:6:27
11    |
12 LL | const X2: bool = unsafe { 42 as *const i32 == 43 as *const i32 };
-    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
-    = note: see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information
+    = note: expected constant `false`
+               found constant `true`
16 
---
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/consts/const-eval/const_raw_ptr_ops.rs:4:26
   |
LL | const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; //~ ERROR pointers cannot
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
   = note: expected constant `false`
              found constant `true`

error[E0308]: mismatched types
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/consts/const-eval/const_raw_ptr_ops.rs:6:27
   |
LL | const X2: bool = unsafe { 42 as *const i32 == 43 as *const i32 }; //~ ERROR pointers cannot
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
   = note: expected constant `false`
              found constant `true`

error: aborting due to 2 previous errors
---
--- stderr -------------------------------
error[E0658]: `for` is not allowed in a `const fn`
##[error]  --> /checkout/tests/ui/consts/const-fn-error.rs:5:5
   |
LL | /     for i in 0..x {
LL | |         //~^ ERROR cannot convert
LL | |         //~| ERROR `for` is not allowed in a `const fn`
LL | |         //~| ERROR mutable references are not allowed in constant functions
LL | |         //~| ERROR cannot call non-const fn
LL | |         sum += i;
   | |_____^
   |
   = note: see issue #87575 <https://github.com/rust-lang/rust/issues/87575> for more information
   = help: add `#![feature(const_for)]` to the crate attributes to enable
---
4 LL |     const fn f() -> u32 {
5    |     ^^^^^ functions in traits cannot be const
6 
- error: aborting due to 1 previous error
+ error[E0049]: method `f` has 1 const parameter but its trait declaration has 0 const parameters
+    |
+    |
+ LL |     fn f() -> u32;
+    |         - expected 0 const parameters
+ LL |     const fn f() -> u32 {
+    |     ^^^^^ found 1 const parameter
8 
- For more information about this error, try `rustc --explain E0379`.
---
   |
LL |     const fn f() -> u32 {
   |     ^^^^^ functions in traits cannot be const

error[E0049]: method `f` has 1 const parameter but its trait declaration has 0 const parameters
   |
LL |     fn f() -> u32;
   |         - expected 0 const parameters
...
---
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+    |              ^^^^ calling non-const function `<std::ops::Range<i32> as IntoIterator>::into_iter`
11 
- error[E0015]: cannot call non-const fn `<std::ops::Range<i32> as Iterator>::next` in constants
-    |
- LL |     for _ in 0..5 {}
-    |              ^^^^
-    |
---

---- [ui] tests/ui/consts/const-try.rs stdout ----
diff of stderr:

- error[E0015]: `?` cannot determine the branch of `TryMe` in constant functions
-   --> $DIR/const-try.rs:33:5
+ error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
3    |
- LL |     TryMe?;
-    |     ^^^^^^
-    |     ^^^^^^
+ LL | impl const FromResidual<Error> for TryMe {
6    |
- note: impl defined here, but it is not `const`
-   --> $DIR/const-try.rs:21:1
-   --> $DIR/const-try.rs:21:1
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
+ 
+ error: const `impl` for trait `Try` which is not marked with `#[const_trait]`
9    |
10 LL | impl const Try for TryMe {
-    | ^^^^^^^^^^^^^^^^^^^^^^^^
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(effects)]` to the crate attributes to enable
- 
- error[E0015]: `?` cannot convert from residual of `TryMe` in constant functions
+    |            ^^^
17    |
- LL |     TryMe?;
-    |     ^^^^^^
-    |     ^^^^^^
-    |
- note: impl defined here, but it is not `const`
-   --> $DIR/const-try.rs:15:1
-    |
- LL | impl const FromResidual<Error> for TryMe {
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(effects)]` to the crate attributes to enable
-    = help: add `#![feature(effects)]` to the crate attributes to enable
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
29 error: aborting due to 2 previous errors
30 

- For more information about this error, try `rustc --explain E0015`.
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/const-try.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-try" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-try/auxiliary"
stdout: none
--- stderr -------------------------------
error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
   |
   |
LL | impl const FromResidual<Error> for TryMe {
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `Try` which is not marked with `#[const_trait]`
   |
LL | impl const Try for TryMe {
   |            ^^^
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 2 previous errors
------------------------------------------



---- [ui] tests/ui/consts/constifconst-call-in-const-position.rs stdout ----
diff of stderr:

7    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
8    = note: `#[warn(incomplete_features)]` on by default
9 
- error[E0015]: cannot call non-const fn `<T as Tr>::a` in constants
-   --> $DIR/constifconst-call-in-const-position.rs:17:9
+ error[E0277]: the trait bound `T: ~const Tr` is not satisfied
12    |
12    |
- LL |     [0; T::a()]
-    |         ^^^^^^
+ LL | const fn foo<T: ~const Tr>() -> [u8; T::a()] {
+    |                                      ^ the trait `~const Tr` is not implemented for `T`
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(effects)]` to the crate attributes to enable
+ help: consider further restricting this bound
+    |
+    |
+ LL | const fn foo<T: ~const Tr + ~const Tr>() -> [u8; T::a()] {
18 
18 
- error[E0015]: cannot call non-const fn `<T as Tr>::a` in constants
-   --> $DIR/constifconst-call-in-const-position.rs:16:38
+ error[E0277]: the trait bound `T: ~const Tr` is not satisfied
21    |
21    |
- LL | const fn foo<T: ~const Tr>() -> [u8; T::a()] {
-    |                                      ^^^^^^
+ LL |     [0; T::a()]
+    |         ^ the trait `~const Tr` is not implemented for `T`
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(effects)]` to the crate attributes to enable
+ help: consider further restricting this bound
+    |
+    |
+ LL | const fn foo<T: ~const Tr + ~const Tr>() -> [u8; T::a()] {
27 
28 error: aborting due to 2 previous errors; 1 warning emitted
29 

---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/constifconst-call-in-const-position.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/constifconst-call-in-const-position" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/constifconst-call-in-const-position/auxiliary"
stdout: none
--- stderr -------------------------------
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
   |
LL | #![feature(const_trait_impl, generic_const_exprs)]
   |                              ^^^^^^^^^^^^^^^^^^^
   |
   |
   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
   = note: `#[warn(incomplete_features)]` on by default

error[E0277]: the trait bound `T: ~const Tr` is not satisfied
   |
   |
LL | const fn foo<T: ~const Tr>() -> [u8; T::a()] {
   |                                      ^ the trait `~const Tr` is not implemented for `T`
help: consider further restricting this bound
   |
   |
LL | const fn foo<T: ~const Tr + ~const Tr>() -> [u8; T::a()] {


error[E0277]: the trait bound `T: ~const Tr` is not satisfied
   |
   |
LL |     [0; T::a()]
   |         ^ the trait `~const Tr` is not implemented for `T`
help: consider further restricting this bound
   |
   |
LL | const fn foo<T: ~const Tr + ~const Tr>() -> [u8; T::a()] {

error: aborting due to 2 previous errors; 1 warning emitted

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


---- [ui] tests/ui/consts/invalid-inline-const-in-match-arm.rs stdout ----
diff of stderr:

- error[E0015]: cannot call non-const closure in constants
+ error[E0080]: evaluation of `main::{constant#0}` failed
3    |
3    |
4 LL |         const { (|| {})() } => {}
-    |                 ^^^^^^^^^
-    |
-    |
-    = note: closures need an RFC before allowed to be called in constants
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+    |                 ^^^^^^^^^ calling non-const function `main::{constant#0}::{closure#0}`
11 error: aborting due to 1 previous error
12 

- For more information about this error, try `rustc --explain E0015`.
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/invalid-inline-const-in-match-arm.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/invalid-inline-const-in-match-arm" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/invalid-inline-const-in-match-arm/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0080]: evaluation of `main::{constant#0}` failed
   |
   |
LL |         const { (|| {})() } => {}
   |                 ^^^^^^^^^ calling non-const function `main::{constant#0}::{closure#0}`
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0080`.
------------------------------------------
---
- error[E0015]: cannot call non-const closure in constants
+ error[E0080]: evaluation of constant value failed
2   --> $DIR/issue-28113.rs:4:5
3    |
4 LL |     || -> u8 { 5 }()
-    |     ^^^^^^^^^^^^^^^^
-    |
-    |
-    = note: closures need an RFC before allowed to be called in constants
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+    |     ^^^^^^^^^^^^^^^^ calling non-const function `X::{closure#0}`
11 error: aborting due to 1 previous error
12 

- For more information about this error, try `rustc --explain E0015`.
---
To only update this specific test, also pass `--test-args consts/issue-28113.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/issue-28113.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/issue-28113" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/issue-28113/auxiliary"
--- stderr -------------------------------
error[E0080]: evaluation of constant value failed
##[error]  --> /checkout/tests/ui/consts/issue-28113.rs:4:5
   |
   |
LL |     || -> u8 { 5 }()
   |     ^^^^^^^^^^^^^^^^ calling non-const function `X::{closure#0}`
error: aborting due to 1 previous error

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

- error[E0015]: cannot call non-const closure in constant functions
-   --> $DIR/issue-56164.rs:1:18
-    |
- LL | const fn foo() { (||{})() }
-    |
-    |
-    = note: closures need an RFC before allowed to be called in constant functions
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
11 error: function pointer calls are not allowed in constant functions
12   --> $DIR/issue-56164.rs:5:5
13    |

---
To only update this specific test, also pass `--test-args consts/issue-56164.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/issue-56164.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/issue-56164" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/issue-56164/auxiliary"
--- stderr -------------------------------
error: function pointer calls are not allowed in constant functions
##[error]  --> /checkout/tests/ui/consts/issue-56164.rs:5:5
   |
---
- error[E0015]: cannot call non-const closure in constants
+ error[E0080]: evaluation of constant value failed
2   --> $DIR/issue-68542-closure-in-array-len.rs:6:13
3    |
4 LL |     a: [(); (|| { 0 })()]
-    |             ^^^^^^^^^^^^
-    |
-    |
-    = note: closures need an RFC before allowed to be called in constants
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+    |             ^^^^^^^^^^^^ calling non-const function `Bug::a::{constant#0}::{closure#0}`
11 error: aborting due to 1 previous error
12 

- For more information about this error, try `rustc --explain E0015`.
---
--- stderr -------------------------------
error[E0080]: evaluation of constant value failed
##[error]  --> /checkout/tests/ui/consts/issue-68542-closure-in-array-len.rs:6:13
   |
LL |     a: [(); (|| { 0 })()] //~ ERROR cannot call non-const closure
   |             ^^^^^^^^^^^^ calling non-const function `Bug::a::{constant#0}::{closure#0}`
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0080`.
------------------------------------------
---
- error[E0015]: cannot call non-const operator in constant functions
+ error[E0308]: mismatched types
2   --> $DIR/issue-73976-monomorphic.rs:21:5
3    |
4 LL |     GetTypeId::<T>::VALUE == GetTypeId::<usize>::VALUE
-    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `host`, found `true`
6    |
- note: impl defined here, but it is not `const`
---
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/consts/issue-73976-monomorphic.rs:21:5
   |
LL |     GetTypeId::<T>::VALUE == GetTypeId::<usize>::VALUE
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `host`, found `true`
   = note: expected constant `host`
              found constant `true`

error: aborting due to 1 previous error
---
diff of stderr:

- error[E0015]: cannot call non-const operator in constant functions
-   --> $DIR/issue-90870.rs:8:5
+ error[E0277]: can't compare `&u8` with `&u8`
3    |
4 LL |     a == b
-    |     ^^^^^^
-    |     ^^^^^^
+    |       ^^ no implementation for `&u8 == &u8`
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
- help: consider dereferencing here
-    |
-    |
- LL |     *a == *b
-    |     +     +
+    = help: the trait `~const PartialEq<&u8>` is not implemented for `&u8`
+    = help: the trait `PartialEq` is implemented for `u8`
- error[E0015]: cannot call non-const operator in constant functions
-   --> $DIR/issue-90870.rs:15:5
-   --> $DIR/issue-90870.rs:15:5
+ error[E0277]: can't compare `&&&&i64` with `&&&&i64`
16    |
17 LL |     a == b
-    |     ^^^^^^
-    |     ^^^^^^
+    |       ^^ no implementation for `&&&&i64 == &&&&i64`
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
- help: consider dereferencing here
-    |
-    |
- LL |     ****a == ****b
-    |     ++++     ++++
+    = help: the trait `~const PartialEq<&&&&i64>` is not implemented for `&&&&i64`
+    = help: the trait `PartialEq` is implemented for `i64`
- error[E0015]: cannot call non-const operator in constant functions
-   --> $DIR/issue-90870.rs:23:12
-   --> $DIR/issue-90870.rs:23:12
+ error[E0277]: can't compare `&u8` with `&u8`
29    |
29    |
30 LL |         if l == r {
-    |            ^^^^^^
+    |              ^^ no implementation for `&u8 == &u8`
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
- help: consider dereferencing here
-    |
-    |
- LL |         if *l == *r {
-    |            +     +
+    = help: the trait `~const PartialEq<&u8>` is not implemented for `&u8`
+    = help: the trait `PartialEq` is implemented for `u8`
40 error: aborting due to 3 previous errors
41 

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

5 #![allow(dead_code)]
6 
7 const fn f(a: &u8, b: &u8) -> bool {
-     *a == *b
+     a == b
9     //~^ ERROR: cannot call non-const operator in constant functions [E0015]
10     //~| HELP: consider dereferencing here
11     //~| HELP: add `#![feature(const_trait_impl)]`
12 }
13 
13 
14 const fn g(a: &&&&i64, b: &&&&i64) -> bool {
-     ****a == ****b
+     a == b
16     //~^ ERROR: cannot call non-const operator in constant functions [E0015]
17     //~| HELP: consider dereferencing here
18     //~| HELP: add `#![feature(const_trait_impl)]`
20 
20 
21 const fn h(mut a: &[u8], mut b: &[u8]) -> bool {
22     while let ([l, at @ ..], [r, bt @ ..]) = (a, b) {
-         if *l == *r {
+         if l == r {
24         //~^ ERROR: cannot call non-const operator in constant functions [E0015]
25         //~| HELP: consider dereferencing here
26         //~| HELP: add `#![feature(const_trait_impl)]`

The actual fixed differed from the expected fixed.
The actual fixed differed from the expected fixed.
Actual fixed saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/issue-90870/issue-90870.fixed
To only update this specific test, also pass `--test-args consts/issue-90870.rs`

error: 2 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/issue-90870.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/issue-90870" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/issue-90870/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: can't compare `&u8` with `&u8`
   |
LL |     a == b
LL |     a == b
   |       ^^ no implementation for `&u8 == &u8`
   |
   = help: the trait `~const PartialEq<&u8>` is not implemented for `&u8`
   = help: the trait `PartialEq` is implemented for `u8`

error[E0277]: can't compare `&&&&i64` with `&&&&i64`
   |
LL |     a == b
LL |     a == b
   |       ^^ no implementation for `&&&&i64 == &&&&i64`
   |
   = help: the trait `~const PartialEq<&&&&i64>` is not implemented for `&&&&i64`
   = help: the trait `PartialEq` is implemented for `i64`

error[E0277]: can't compare `&u8` with `&u8`
   |
   |
LL |         if l == r {
   |              ^^ no implementation for `&u8 == &u8`
   |
   = help: the trait `~const PartialEq<&u8>` is not implemented for `&u8`
   = help: the trait `PartialEq` is implemented for `u8`
error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
---
8 
- error[E0015]: cannot call non-const operator in constant functions
-   --> $DIR/issue-94675.rs:11:17
-    |
- LL |         self.bar[0] = baz.len();
-    |
- note: impl defined here, but it is not `const`
-   --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
---
To only update this specific test, also pass `--test-args consts/issue-94675.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/issue-94675.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/issue-94675" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/issue-94675/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0015]: cannot call non-const fn `Vec::<u32>::len` in constant functions
   |
   |
LL |         self.bar[0] = baz.len();
   |
   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants

error: aborting due to 1 previous error
---
- error: pointers cannot be reliably compared during const eval
+ error[E0308]: mismatched types
2   --> $DIR/cmp_fn_pointers.rs:2:14
3    |
4 LL |     unsafe { x == y }
-    |              ^^^^^^
+    |              ^^^^^^ expected `host`, found `true`
6    |
-    = note: see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information
---
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/consts/min_const_fn/cmp_fn_pointers.rs:2:14
   |
LL |     unsafe { x == y }
   |              ^^^^^^ expected `host`, found `true`
   = note: expected constant `host`
              found constant `true`

error: aborting due to 1 previous error
---
-    |
- help: skipping check that does not even have a feature gate
-   --> $DIR/drop.rs:16:9
-    |
- LL |     let _v: Vec<i32> = Vec::new();
- 
- error: aborting due to 1 previous error; 1 warning emitted
+ error: aborting due to 1 previous error
23 
---
To only update this specific test, also pass `--test-args consts/miri_unleashed/drop.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/miri_unleashed/drop.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/drop" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/drop/auxiliary" "-Zunleash-the-miri-inside-of-you"
--- stderr -------------------------------
error[E0080]: could not evaluate static initializer
##[error]  --> /rustc/FAKE_PREFIX/library/core/src/ptr/mod.rs:507:1
   |
   |
   = note: calling non-const function `<Vec<i32> as Drop>::drop`
   |
note: inside `std::ptr::drop_in_place::<Vec<i32>> - shim(Some(Vec<i32>))`
  --> /rustc/FAKE_PREFIX/library/core/src/ptr/mod.rs:507:1
note: inside `TEST_BAD`
   |
LL | };
   | ^

---
---- [ui] tests/ui/consts/miri_unleashed/assoc_const.rs stdout ----
diff of stderr:

27    |
28    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
- warning: skipping const checks
-    |
- help: skipping check that does not even have a feature gate
-   --> $DIR/assoc_const.rs:12:20
-   --> $DIR/assoc_const.rs:12:20
-    |
- LL |     const F: u32 = (U::X, 42).1;
- 
- error: aborting due to 1 previous error; 1 warning emitted
+ error: aborting due to 1 previous error
39 
---
To only update this specific test, also pass `--test-args consts/miri_unleashed/assoc_const.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/miri_unleashed/assoc_const.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/assoc_const" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/assoc_const/auxiliary" "-Zunleash-the-miri-inside-of-you"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0080]: evaluation of `<String as Bar<Vec<u32>, String>>::F` failed
##[error]  --> /rustc/FAKE_PREFIX/library/core/src/ptr/mod.rs:507:1
   |
   = note: calling non-const function `<Vec<u32> as Drop>::drop`
   |
note: inside `std::ptr::drop_in_place::<Vec<u32>> - shim(Some(Vec<u32>))`
  --> /rustc/FAKE_PREFIX/library/core/src/ptr/mod.rs:507:1
note: inside `std::ptr::drop_in_place::<(Vec<u32>, u32)> - shim(Some((Vec<u32>, u32)))`
  --> /rustc/FAKE_PREFIX/library/core/src/ptr/mod.rs:507:1
note: inside `<String as Bar<Vec<u32>, String>>::F`
   |
   |
LL |     const F: u32 = (U::X, 42).1;

note: erroneous constant encountered
  --> /checkout/tests/ui/consts/miri_unleashed/assoc_const.rs:29:13
   |
   |
LL |     let y = <String as Bar<Vec<u32>, String>>::F; //~ constant

note: erroneous constant encountered
  --> /checkout/tests/ui/consts/miri_unleashed/assoc_const.rs:29:13
   |
   |
LL |     let y = <String as Bar<Vec<u32>, String>>::F; //~ constant
   |
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 1 previous error

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


---- [ui] tests/ui/consts/promoted-const-drop.rs stdout ----
diff of stderr:

- error[E0716]: temporary value dropped while borrowed
-   --> $DIR/promoted-const-drop.rs:13:26
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
3    |
3    |
- LL |     let _: &'static A = &A();
-    |            ----------    ^^^ creates a temporary value which is freed while still in use
-    |            |
-    |            type annotation requires that borrow lasts for `'static`
- LL |     let _: &'static [A] = &[C];
-    | - temporary value is freed at the end of this statement
- 
- error[E0716]: temporary value dropped while borrowed
-   --> $DIR/promoted-const-drop.rs:14:28
-   --> $DIR/promoted-const-drop.rs:14:28
+ LL | impl const Drop for A {
+    |            ^^^^
14    |
- LL |     let _: &'static [A] = &[C];
-    |            ------------    ^^^ creates a temporary value which is freed while still in use
-    |            |
-    |            type annotation requires that borrow lasts for `'static`
-    | - temporary value is freed at the end of this statement
-    | - temporary value is freed at the end of this statement
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
- error: aborting due to 2 previous errors
+ error: aborting due to 1 previous error
23 
- For more information about this error, try `rustc --explain E0716`.
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/promoted-const-drop.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/promoted-const-drop" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/promoted-const-drop/auxiliary"
stdout: none
--- stderr -------------------------------
error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
LL | impl const Drop for A {
   |            ^^^^
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 1 previous error
------------------------------------------



---- [ui] tests/ui/consts/promoted_const_call.rs stdout ----
diff of stderr:

- error[E0493]: destructor of `Panic` cannot be evaluated at compile-time
-   --> $DIR/promoted_const_call.rs:11:30
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
3    |
3    |
- LL |     let _: &'static _ = &id(&Panic);
-    |                              ^^^^^ - value is dropped here
-    |                              the destructor for this type cannot be evaluated in constants
- 
- error[E0716]: temporary value dropped while borrowed
-   --> $DIR/promoted_const_call.rs:11:26
-   --> $DIR/promoted_const_call.rs:11:26
+ LL | impl const Drop for Panic { fn drop(&mut self) { panic!(); } }
11    |
11    |
- LL |     let _: &'static _ = &id(&Panic);
-    |            ----------    ^^^^^^^^^^ creates a temporary value which is freed while still in use
-    |            |
-    |            type annotation requires that borrow lasts for `'static`
- LL | };
-    | - temporary value is freed at the end of this statement
-    | - temporary value is freed at the end of this statement
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
- error[E0716]: temporary value dropped while borrowed
-   --> $DIR/promoted_const_call.rs:11:30
-    |
-    |
- LL |     let _: &'static _ = &id(&Panic);
-    |            ----------        ^^^^^ - temporary value is freed at the end of this statement
-    |            |                 creates a temporary value which is freed while still in use
-    |            |                 creates a temporary value which is freed while still in use
-    |            type annotation requires that borrow lasts for `'static`
28 
- error[E0716]: temporary value dropped while borrowed
-   --> $DIR/promoted_const_call.rs:17:26
-    |
-    |
- LL |     let _: &'static _ = &id(&Panic);
-    |            ----------    ^^^^^^^^^^ creates a temporary value which is freed while still in use
-    |            |
-    |            type annotation requires that borrow lasts for `'static`
- LL | }
-    | - temporary value is freed at the end of this statement
- 
- error[E0716]: temporary value dropped while borrowed
- error[E0716]: temporary value dropped while borrowed
-   --> $DIR/promoted_const_call.rs:17:30
-    |
- LL |     let _: &'static _ = &id(&Panic);
-    |            ----------        ^^^^^ - temporary value is freed at the end of this statement
-    |            |                 creates a temporary value which is freed while still in use
-    |            |                 creates a temporary value which is freed while still in use
-    |            type annotation requires that borrow lasts for `'static`
- error[E0716]: temporary value dropped while borrowed
-   --> $DIR/promoted_const_call.rs:20:26
-    |
-    |
- LL |     let _: &'static _ = &&(Panic, 0).1;
-    |            ----------    ^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
-    |            |
-    |            type annotation requires that borrow lasts for `'static`
- LL | }
-    | - temporary value is freed at the end of this statement
- 
- error[E0716]: temporary value dropped while borrowed
- error[E0716]: temporary value dropped while borrowed
-   --> $DIR/promoted_const_call.rs:20:27
-    |
- LL |     let _: &'static _ = &&(Panic, 0).1;
-    |            ----------     ^^^^^^^^^^ creates a temporary value which is freed while still in use
-    |            |
-    |            type annotation requires that borrow lasts for `'static`
- LL | }
-    | - temporary value is freed at the end of this statement
- 
- error: aborting due to 7 previous errors
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/promoted_const_call.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/promoted_const_call" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/promoted_const_call/auxiliary"
stdout: none
--- stderr -------------------------------
error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
   |
LL | impl const Drop for Panic { fn drop(&mut self) { panic!(); } }
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 1 previous error
------------------------------------------



---- [ui] tests/ui/generic-const-items/const-trait-impl.rs stdout ----
diff of stderr:

- error[E0015]: cannot call non-const fn `<T as Create>::create` in constants
2   --> $DIR/const-trait-impl.rs:11:30
3    |
3    |
4 LL | const CREATE<T: Create>: T = T::create();
-    |                              ^^^^^^^^^^^
-    |                              ^^^^^^^^^^^
+    |                              ^^^^^^^^^^^ expected `false`, found `true`
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(effects)]` to the crate attributes to enable
+    = note: expected constant `false`
+               found constant `true`
---
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/generic-const-items/const-trait-impl.rs:11:30
   |
LL | const CREATE<T: Create>: T = T::create();
   |                              ^^^^^^^^^^^ expected `false`, found `true`
   = note: expected constant `false`
              found constant `true`

error: aborting due to 1 previous error
---
- error[E0015]: cannot perform deref coercion on `A` in statics
+ error[E0080]: could not evaluate static initializer
2   --> $DIR/issue-25901.rs:4:24
3    |
4 LL | static S: &'static B = &A;
-    |                        ^^
-    |
-    = note: attempting to deref into `B`
- note: deref defined here
---
-   --> $DIR/issue-25901.rs:9:1
-    |
- LL | impl Deref for A {
-    | ^^^^^^^^^^^^^^^^
-    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-    = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
+    |                        ^^ calling non-const function `<A as Deref>::deref`
22 error: aborting due to 1 previous error
23 

- For more information about this error, try `rustc --explain E0015`.
---
To only update this specific test, also pass `--test-args issues/issue-25901.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/issues/issue-25901.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-25901" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-25901/auxiliary"
--- stderr -------------------------------
error[E0080]: could not evaluate static initializer
##[error]  --> /checkout/tests/ui/issues/issue-25901.rs:4:24
   |
   |
LL | static S: &'static B = &A;
   |                        ^^ calling non-const function `<A as Deref>::deref`
error: aborting due to 1 previous error

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


---- [ui] tests/ui/mismatched_types/const-fn-in-trait.rs stdout ----
diff of stderr:

10 LL |     const fn f() -> u32 { 22 }
12 
- error: aborting due to 2 previous errors
- error: aborting due to 2 previous errors
+ error[E0049]: method `f` has 1 const parameter but its trait declaration has 0 const parameters
+    |
+    |
+ LL |     fn f() -> u32;
+    |         - expected 0 const parameters
+ ...
+ LL |     const fn f() -> u32 { 22 }
+    |     ^^^^^ found 1 const parameter
- For more information about this error, try `rustc --explain E0379`.
- For more information about this error, try `rustc --explain E0379`.
+ error[E0049]: method `g` has 0 const parameters but its trait declaration has 1 const parameter
+    |
+ LL |     const fn g();
+    |     ----- expected 1 const parameter
+ ...
+ ...
+ LL |     fn g() {}
+    |         ^ found 0 const parameters
+ error: aborting due to 4 previous errors
+ 
+ Some errors have detailed explanations: E0049, E0379.
+ For more information about an error, try `rustc --explain E0049`.
---
--- stderr -------------------------------
error[E0379]: functions in traits cannot be declared const
##[error]  --> /checkout/tests/ui/mismatched_types/const-fn-in-trait.rs:3:5
   |
LL |     const fn g(); //~ ERROR cannot be declared const

error[E0379]: functions in traits cannot be declared const
##[error]  --> /checkout/tests/ui/mismatched_types/const-fn-in-trait.rs:7:5
   |
   |
LL |     const fn f() -> u32 { 22 } //~ ERROR cannot be declared const


error[E0049]: method `f` has 1 const parameter but its trait declaration has 0 const parameters
   |
LL |     fn f() -> u32;
   |         - expected 0 const parameters
...
...
LL |     const fn f() -> u32 { 22 } //~ ERROR cannot be declared const
   |     ^^^^^ found 1 const parameter

error[E0049]: method `g` has 0 const parameters but its trait declaration has 1 const parameter
   |
   |
LL |     const fn g(); //~ ERROR cannot be declared const
   |     ----- expected 1 const parameter
LL |     fn g() {}
LL |     fn g() {}
   |         ^ found 0 const parameters
error: aborting due to 4 previous errors

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


---- [ui] tests/ui/never_type/issue-52443.rs stdout ----
diff of stderr:

40 LL |     [(); loop { break 42 }];
42 
42 
- error[E0015]: cannot convert `RangeFrom<usize>` into an iterator in constants
-    |
-    |
- LL |     [(); { for _ in 0usize.. {}; 0}];
-    |
- note: impl defined here, but it is not `const`
-   --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
---

60    = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
61    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
62 
- error[E0015]: cannot call non-const fn `<RangeFrom<usize> as Iterator>::next` in constants
-    |
-    |
- LL |     [(); { for _ in 0usize.. {}; 0}];
-    |
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+ error: aborting due to 4 previous errors; 1 warning emitted
---
To only update this specific test, also pass `--test-args never_type/issue-52443.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/issue-52443.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/issue-52443" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/issue-52443/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
warning: denote infinite loops with `loop { ... }`
   |
   |
LL |     [(); {while true {break}; 0}];
   |           ^^^^^^^^^^ help: use `loop`
   = note: `#[warn(while_true)]` on by default

error[E0658]: `for` is not allowed in a `const`
##[error]  --> /checkout/tests/ui/never_type/issue-52443.rs:9:12
##[error]  --> /checkout/tests/ui/never_type/issue-52443.rs:9:12
   |
LL |     [(); { for _ in 0usize.. {}; 0}];
   |
   = note: see issue #87575 <https://github.com/rust-lang/rust/issues/87575> for more information
   = help: add `#![feature(const_for)]` to the crate attributes to enable


error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/never_type/issue-52443.rs:2:10
   |
LL |     [(); & { loop { continue } } ]; //~ ERROR mismatched types
   |          ^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_`
   = note:   expected type `usize`
           found reference `&_`
help: consider removing the borrow
   |
   |
LL -     [(); & { loop { continue } } ]; //~ ERROR mismatched types
LL +     [(); { loop { continue } } ]; //~ ERROR mismatched types

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/never_type/issue-52443.rs:4:17
   |
   |
LL |     [(); loop { break }]; //~ ERROR mismatched types
   |
help: give it a value of the expected type
   |
   |
LL |     [(); loop { break 42 }]; //~ ERROR mismatched types

error[E0658]: mutable references are not allowed in constants
##[error]  --> /checkout/tests/ui/never_type/issue-52443.rs:9:21
   |
   |
LL |     [(); { for _ in 0usize.. {}; 0}];
   |
   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable

---

---- [ui] tests/ui/resolve/issue-39559-2.rs stdout ----
diff of stderr:

- error[E0015]: cannot call non-const fn `<Dim3 as Dim>::dim` in constants
2   --> $DIR/issue-39559-2.rs:14:24
3    |
3    |
4 LL |     let array: [usize; Dim3::dim()]
-    |                        ^^^^^^^^^^^
-    |
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+    |                        ^^^^^^^^^^^ calling non-const function `<Dim3 as Dim>::dim`
9 
- error[E0015]: cannot call non-const fn `<Dim3 as Dim>::dim` in constants
11   --> $DIR/issue-39559-2.rs:16:15
12    |
12    |
13 LL |         = [0; Dim3::dim()];
-    |               ^^^^^^^^^^^
-    |
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+    |               ^^^^^^^^^^^ calling non-const function `<Dim3 as Dim>::dim`
19 error: aborting due to 2 previous errors
20 

- For more information about this error, try `rustc --explain E0015`.
---
To only update this specific test, also pass `--test-args resolve/issue-39559-2.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/resolve/issue-39559-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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/issue-39559-2" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/issue-39559-2/auxiliary"
--- stderr -------------------------------
error[E0080]: evaluation of constant value failed
##[error]  --> /checkout/tests/ui/resolve/issue-39559-2.rs:14:24
   |
   |
LL |     let array: [usize; Dim3::dim()]
   |                        ^^^^^^^^^^^ calling non-const function `<Dim3 as Dim>::dim`
error[E0080]: evaluation of constant value failed
##[error]  --> /checkout/tests/ui/resolve/issue-39559-2.rs:16:15
   |
   |
LL |         = [0; Dim3::dim()];
   |               ^^^^^^^^^^^ calling non-const function `<Dim3 as Dim>::dim`
error: aborting due to 2 previous errors

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


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.rs stdout ----
diff of stderr:

- error[E0015]: cannot call non-const fn `<i32 as Plus>::plus` in constant functions
-   --> $DIR/call-const-trait-method-pass.rs:36:7
+ error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
3    |
3    |
- LL |     a.plus(b)
+ LL | impl const std::ops::Add for Int {
+    |            ^^^^^^^^^^^^^
6    |
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(effects)]` to the crate attributes to enable
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
- error[E0015]: cannot call non-const operator in constants
-   --> $DIR/call-const-trait-method-pass.rs:39:22
-    |
-    |
- LL | const ADD_INT: Int = Int(1i32) + Int(2i32);
-    |
- note: impl defined here, but it is not `const`
-   --> $DIR/call-const-trait-method-pass.rs:7:1
-    |
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass/auxiliary"
stdout: none
--- stderr -------------------------------
error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
   |
LL | impl const std::ops::Add for Int {
   |            ^^^^^^^^^^^^^
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 1 previous error
------------------------------------------



---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.rs stdout ----
diff of stderr:

- error[E0117]: only traits defined in the current crate can be implemented for primitive types
-   --> $DIR/const-and-non-const-impl.rs:7:1
+ error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
3    |
4 LL | impl const std::ops::Add for i32 {
-    | ^^^^^^^^^^^-------------^^^^^---
-    | |          |                 |
-    | |          |                 |
-    | |          |                 `i32` is not defined in the current crate
-    | |          `i32` is not defined in the current crate
-    | impl doesn't use only types from inside the current crate
+    |            ^^^^^^^^^^^^^
10    |
-    = note: define and implement a trait or new type instead
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
- error[E0119]: conflicting implementations of trait `Add` for type `Int`
-   --> $DIR/const-and-non-const-impl.rs:23:1
-   --> $DIR/const-and-non-const-impl.rs:23:1
+ error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
15    |
- LL | impl std::ops::Add for Int {
-    | -------------------------- first implementation here
- ...
- ...
19 LL | impl const std::ops::Add for Int {
-    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Int`
+    |            ^^^^^^^^^^^^^
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
22 error: aborting due to 2 previous errors
23 

- Some errors have detailed explanations: E0117, E0119.
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl/auxiliary"
stdout: none
--- stderr -------------------------------
error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
   |
LL | impl const std::ops::Add for i32 {
   |            ^^^^^^^^^^^^^
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
   |
LL | impl const std::ops::Add for Int {
   |            ^^^^^^^^^^^^^
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 2 previous errors
------------------------------------------


---
diff of stderr:

- error[E0493]: destructor of `T` cannot be evaluated at compile-time
-   --> $DIR/const-drop-fail.rs:24:36
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
3    |
3    |
- LL | const fn check<T: ~const Destruct>(_: T) {}
-    |                                    ^      - value is dropped here
-    |                                    the destructor for this type cannot be evaluated in constant functions
-    |                                    the destructor for this type cannot be evaluated in constant functions
+ LL | impl const Drop for ConstImplWithDropGlue {
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
9 error: aborting due to 1 previous error
10 

- For more information about this error, try `rustc --explain E0493`.
---
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock/const-drop-fail.stock.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs`

error in revision `stock`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "stock" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
   |
LL | impl const Drop for ConstImplWithDropGlue {
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 1 previous error
------------------------------------------



---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.rs stdout ----
diff of stderr:

- error[E0493]: destructor of `T` cannot be evaluated at compile-time
-   --> $DIR/const-drop-fail-2.rs:21:36
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
3    |
3    |
- LL | const fn check<T: ~const Destruct>(_: T) {}
-    |                                    ^      - value is dropped here
-    |                                    the destructor for this type cannot be evaluated in constant functions
-    |                                    the destructor for this type cannot be evaluated in constant functions
+ LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
9 error: aborting due to 1 previous error
10 

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


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2/const-drop-fail-2.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.rs`
error: 1 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
   |
LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 1 previous error
------------------------------------------



---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs#precise stdout ----
diff of stderr:

- error[E0493]: destructor of `T` cannot be evaluated at compile-time
-   --> $DIR/const-drop-fail.rs:24:36
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
3    |
3    |
- LL | const fn check<T: ~const Destruct>(_: T) {}
-    |                                    ^ the destructor for this type cannot be evaluated in constant functions
+ LL | impl const Drop for ConstImplWithDropGlue {
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
7 error: aborting due to 1 previous error
8 

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


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise/const-drop-fail.precise.stderr
To only update this specific test, also pass `--test-args rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs`


error in revision `precise`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "precise" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
   |
LL | impl const Drop for ConstImplWithDropGlue {
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 1 previous error
------------------------------------------



---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.rs stdout ----
diff of stderr:

6    |
7    = help: add `#![feature(derive_const)]` to the crate attributes to enable
8 
- error: aborting due to 1 previous error
+ error: const `impl` for trait `Default` which is not marked with `#[const_trait]`
+    |
+ LL | #[derive_const(Default)]
+    |                ^^^^^^^
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
+    = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
+ error: aborting due to 2 previous errors
10 
11 For more information about this error, try `rustc --explain E0658`.
12 
---
--- stderr -------------------------------
error[E0658]: use of unstable library feature 'derive_const'
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.rs:1:3
   |
LL | #[derive_const(Default)] //~ ERROR use of unstable library feature
   |
   = help: add `#![feature(derive_const)]` to the crate attributes to enable


error: const `impl` for trait `Default` which is not marked with `#[const_trait]`
   |
   |
LL | #[derive_const(Default)] //~ ERROR use of unstable library feature
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
   = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors

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


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs#precise stdout ----
diff of stderr:

6    |
7    = note: this item cannot have `~const` trait bounds
- error: aborting due to 1 previous error
- error: aborting due to 1 previous error
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
+    |
+    |
+ LL | impl<'a> const Drop for S<'a> {
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
+ 
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
+    |
+ LL |     impl const Drop for ConstDrop {
+    |                ^^^^
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
+ 
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
+    |
+    |
+ LL |     impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
+ 
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
+    |
+    |
+ LL |     impl<T: SomeTrait> const Drop for ConstDropWithNonconstBound<T> {
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
+ error: aborting due to 5 previous errors
10 
11 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise/const-drop.precise.stderr
To only update this specific test, also pass `--test-args rfcs/rfc-2632-const-trait-impl/const-drop.rs`


error in revision `precise`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "precise" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error: `~const` is not allowed here
   |
   |
LL |     pub struct ConstDropWithBound<T: ~const SomeTrait>(pub core::marker::PhantomData<T>);
   |
   |
   = note: this item cannot have `~const` trait bounds

error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
   |
LL | impl<'a> const Drop for S<'a> {
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
LL |     impl const Drop for ConstDrop {
   |                ^^^^
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
   |
LL |     impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
   |
LL |     impl<T: SomeTrait> const Drop for ConstDropWithNonconstBound<T> {
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 5 previous errors
------------------------------------------



---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs#stock stdout ----
diff of stderr:

6    |
7    = note: this item cannot have `~const` trait bounds
- error: aborting due to 1 previous error
- error: aborting due to 1 previous error
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
+    |
+    |
+ LL | impl<'a> const Drop for S<'a> {
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
+ 
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
+    |
+ LL |     impl const Drop for ConstDrop {
+    |                ^^^^
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
+ 
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
+    |
+    |
+ LL |     impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
+ 
+ error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
+    |
+    |
+ LL |     impl<T: SomeTrait> const Drop for ConstDropWithNonconstBound<T> {
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
+ error: aborting due to 5 previous errors
10 
11 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock/const-drop.stock.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args rfcs/rfc-2632-const-trait-impl/const-drop.rs`

error in revision `stock`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "stock" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error: `~const` is not allowed here
   |
   |
LL |     pub struct ConstDropWithBound<T: ~const SomeTrait>(pub core::marker::PhantomData<T>);
   |
   |
   = note: this item cannot have `~const` trait bounds

error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
   |
LL | impl<'a> const Drop for S<'a> {
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
LL |     impl const Drop for ConstDrop {
   |                ^^^^
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
   |
LL |     impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
   |
   |
LL |     impl<T: SomeTrait> const Drop for ConstDropWithNonconstBound<T> {
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 5 previous errors
------------------------------------------


---
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs:15:9
   |
LL |         foo::<()>();
   |         ^^^^^^^^^^^ expected `host`, found `true`
   = note: expected constant `host`
              found constant `true`

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

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


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs#stock stdout ----

error in revision `stock`: ui test compiled successfully!
status: exit status: 0
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "stock" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stock" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stock/auxiliary"
stderr: none


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs#stocknc stdout ----
---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs#stocknc stdout ----
diff of stderr:

- error[E0015]: cannot call non-const fn `<cross_crate::NonConst as cross_crate::MyTrait>::func` in constant functions
+ error[E0277]: the trait bound `cross_crate::NonConst: ~const cross_crate::MyTrait` is not satisfied
3    |
4 LL |     NonConst.func();

-    |              ^^^^^^
-    |              ^^^^^^
+    |              ^^^^ the trait `~const cross_crate::MyTrait` is not implemented for `cross_crate::NonConst`
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+    = help: the trait `cross_crate::MyTrait` is implemented for `cross_crate::NonConst`
9 
- error[E0015]: cannot call non-const fn `<cross_crate::Const as cross_crate::MyTrait>::func` in constant functions
-    |
- LL |     Const.func();
-    |           ^^^^^^
-    |
---
22 


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stocknc/cross-crate.stocknc.stderr
To only update this specific test, also pass `--test-args rfcs/rfc-2632-const-trait-impl/cross-crate.rs`


error in revision `stocknc`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "stocknc" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stocknc" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.stocknc/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `cross_crate::NonConst: ~const cross_crate::MyTrait` is not satisfied
   |
LL |     NonConst.func();
LL |     NonConst.func();
   |              ^^^^ the trait `~const cross_crate::MyTrait` is not implemented for `cross_crate::NonConst`
   |
   = help: the trait `cross_crate::MyTrait` is implemented for `cross_crate::NonConst`
error: aborting due to 1 previous error

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


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.rs stdout ----
diff of stderr:

- error[E0015]: cannot call non-const operator in constant functions
-   --> $DIR/generic-bound.rs:25:5
+ error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
3    |
- LL |     arg + arg
-    |     ^^^^^^^^^
-    |
-    |
- note: impl defined here, but it is not `const`
-   --> $DIR/generic-bound.rs:16:1
-    |
10 LL | impl<T> const std::ops::Add for S<T> {
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(effects)]` to the crate attributes to enable
+    |               ^^^^^^^^^^^^^
+    |
+    |
+    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+    = note: adding a non-const method body in the future would be a breaking change
15 error: aborting due to 1 previous error
16 

- For more information about this error, try `rustc --explain E0015`.
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/generic-bound" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/generic-bound/auxiliary"
stdout: none
--- stderr -------------------------------
error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
   |
   |
LL | impl<T> const std::ops::Add for S<T> {
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error: aborting due to 1 previous error
------------------------------------------


---
+    |
+ LL | impl const S {}
+    |      ^^^^^ unconstrained const parameter
+    |
+    = note: expressions using a const parameter must map each value to a distinct output value
+    = note: proving the result of expressions other than the parameter are unique is not supported
+ error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/inherent-impl.rs:10:6
+    |
+ LL | impl const T {}
+ LL | impl const T {}
+    |      ^^^^^ unconstrained const parameter
+    |
+    = note: expressions using a const parameter must map each value to a distinct output value
+    = note: proving the result of expressions other than the parameter are unique is not supported
+ error: aborting due to 4 previous errors
+ 
+ For more information about this error, try `rustc --explain E0207`.
23 
---
   |
LL | impl const S {}
   |      ^^^^^ unconstrained const parameter
   |
   = note: expressions using a const parameter must map each value to a distinct output value
   = note: proving the result of expressions other than the parameter are unique is not supported
error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl.rs:10:6
   |
LL | impl const T {}
LL | impl const T {}
   |      ^^^^^ unconstrained const parameter
   |
   = note: expressions using a const parameter must map each value to a distinct output value
   = note: proving the result of expressions other than the parameter are unique is not supported
error: aborting due to 4 previous errors

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


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs stdout ----

error: ui test compiled successfully!
status: exit status: 0
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/issue-88155" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/issue-88155/auxiliary"
stderr: none


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs stdout ----
---
28 
+ error[E0308]: mismatched types
+   --> $DIR/no-explicit-const-params-cross-crate.rs:16:5
+    |
+ LL |     <() as Bar<false>>::bar();
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
+    = note: expected constant `false`
+               found constant `true`
+ 
+ 
29 error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
31    |

54 LL | pub trait Bar {
55    |           ^^^
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
   |
   |
LL |     foo::<false>();
   |     ^^^--------- help: remove these generics
   |     expected 0 generic arguments
   |
note: function defined here, with 0 generic parameters
  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs:3:14
  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs:3:14
   |
LL | pub const fn foo() {}
   |              ^^^

error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   |
   |
LL |     <() as Bar<false>>::bar();
   |            ^^^------- help: remove these generics
   |            expected 0 generic arguments
   |
note: trait defined here, with 0 generic parameters
  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs:6:11
  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs:6:11
   |
LL | pub trait Bar {
   |           ^^^

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs:16:5
   |
LL |     <() as Bar<false>>::bar();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
   = note: expected constant `false`
              found constant `true`


error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
   |
   |
LL |     foo::<true>();
   |     ^^^-------- help: remove these generics
   |     expected 0 generic arguments
   |
note: function defined here, with 0 generic parameters
  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs:3:14
  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs:3:14
   |
LL | pub const fn foo() {}
   |              ^^^

error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
   |
   |
LL |     <() as Bar<true>>::bar();
   |            ^^^------ help: remove these generics
   |            expected 0 generic arguments
   |
note: trait defined here, with 0 generic parameters
  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs:6:11
---
4 LL |         n => n(),

-    |              ^^^
-    |
-    = note: closures need an RFC before allowed to be called in constants
-    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(effects)]` to the crate attributes to enable
+    |              ^^^ calling non-const function `Bug::inner::{constant#0}::{closure#0}`
11 error: aborting due to 1 previous error
12 

- For more information about this error, try `rustc --explain E0015`.
- For more information about this error, try `rustc --explain E0015`.
+ For more information about this error, try `rustc --explain E0080`.
14 


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/issue-102985/issue-102985.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args rfcs/rfc-2632-const-trait-impl/issue-102985.rs`
error: 1 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/issue-102985" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/issue-102985/auxiliary"
--- stderr -------------------------------
error[E0080]: evaluation of constant value failed
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs:6:14
   |
   |
LL |         n => n(),
   |              ^^^ calling non-const function `Bug::inner::{constant#0}::{closure#0}`
error: aborting due to 1 previous error

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


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.rs stdout ----

error: ui test compiled successfully!
status: exit status: 0
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/issue-92111" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/issue-92111/auxiliary"
stderr: none


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-const-closure-non-const-outer.rs stdout ----
---

---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs#gated stdout ----
diff of stderr:

- error[E0015]: cannot match on `str` in constant functions
+ warning: to use a constant of type `&str` in a pattern, the type must implement `PartialEq`
2   --> $DIR/match-non-const-eq.rs:7:9
3    |
4 LL |         "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in const contexts
5    |         ^^^
6    |
-    = note: `str` cannot be compared in compile-time, and therefore cannot be used in `match`es
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(effects)]` to the crate attributes to enable
+    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+    = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
+    = note: `#[warn(const_patterns_without_partial_eq)]` on by default
- error: aborting due to 1 previous error
- error: aborting due to 1 previous error
+ error[E0277]: can't compare `str` with `str`
+   --> $DIR/match-non-const-eq.rs:7:9
+    |
+ LL |         "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in const contexts
+    |         ^^^ no implementation for `str == str`
+    |
+    = help: the trait `~const PartialEq` is not implemented for `str`
+    = help: the following other types implement trait `PartialEq<Rhs>`:
+              <str as PartialEq<Cow<'a, str>>>
+              <str as PartialEq<OsString>>
+              <str as PartialEq<OsStr>>
+              <str as PartialEq<String>>
+              <str as PartialEq>
+              <&'a str as PartialEq<OsString>>
+              <&'a str as PartialEq<String>>
+              <&'b str as PartialEq<Cow<'a, str>>>
- For more information about this error, try `rustc --explain E0015`.
+ error: aborting due to 1 previous error; 1 warning emitted
+ 
+ For more information about this error, try `rustc --explain E0277`.
+ For more information about this error, try `rustc --explain E0277`.
+ Future incompatibility report: Future breakage diagnostic:
+ warning: to use a constant of type `&str` in a pattern, the type must implement `PartialEq`
+   --> $DIR/match-non-const-eq.rs:7:9
+    |
+ LL |         "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in const contexts
+    |
+    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+    = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
+    = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
+    = note: `#[warn(const_patterns_without_partial_eq)]` on by default
14 


The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.gated/match-non-const-eq.gated.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs`
error in revision `gated`: 1 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "gated" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.gated" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.gated/auxiliary"
--- stderr -------------------------------
warning: to use a constant of type `&str` in a pattern, the type must implement `PartialEq`
##[warning]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs:7:9
   |
   |
LL |         "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in const contexts
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
   = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
   = note: `#[warn(const_patterns_without_partial_eq)]` on by default

error[E0277]: can't compare `str` with `str`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs:7:9
   |
LL |         "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in const contexts
   |         ^^^ no implementation for `str == str`
   |
   = help: the trait `~const PartialEq` is not implemented for `str`
   = help: the following other types implement trait `PartialEq<Rhs>`:
             <str as PartialEq<Cow<'a, str>>>
             <str as PartialEq<OsString>>
             <str as PartialEq<OsStr>>
             <str as PartialEq<String>>
             <str as PartialEq>
             <&'a str as PartialEq<OsString>>
             <&'a str as PartialEq<String>>
             <&'b str as PartialEq<Cow<'a, str>>>
error: aborting due to 1 previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0277`.
Future incompatibility report: Future breakage diagnostic:
Future incompatibility report: Future breakage diagnostic:
warning: to use a constant of type `&str` in a pattern, the type must implement `PartialEq`
##[warning]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs:7:9
   |
LL |         "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in const contexts
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
   = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
   = note: `#[warn(const_patterns_without_partial_eq)]` on by default


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs stdout ----

---
--- stderr -------------------------------
error: cannot specialize on const impl with non-const impl
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs:28:1
   |
LL | / impl<T> Bar for T
LL | | where
LL | |     T: Foo, //FIXME ~ ERROR missing `~const` qualifier
LL | |     T: Specialize,

error[E0119]: conflicting implementations of trait `Baz`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs:48:1
   |
   |
LL | / impl<T> const Baz for T
LL | | where
LL | |     T: ~const Foo,
   | |__________________- first implementation here
...
LL | / impl<T> const Baz for T //FIXME ~ ERROR conflicting implementations of trait `Baz`
LL | |     T: Foo,
LL | |     T: Specialize,
   | |__________________^ conflicting implementation

---

---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs#stock stdout ----
diff of stderr:

- error[E0015]: cannot match on `str` in constant functions
+ warning: to use a constant of type `&str` in a pattern, the type must implement `PartialEq`
2   --> $DIR/match-non-const-eq.rs:7:9
3    |
4 LL |         "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in const contexts
5    |         ^^^
6    |
-    = note: `str` cannot be compared in compile-time, and therefore cannot be used in `match`es
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+    = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
+    = note: `#[warn(const_patterns_without_partial_eq)]` on by default
- error: aborting due to 1 previous error
- error: aborting due to 1 previous error
+ error[E0277]: can't compare `str` with `str`
+   --> $DIR/match-non-const-eq.rs:7:9
+    |
+ LL |         "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in const contexts
+    |         ^^^ no implementation for `str == str`
+    |
+    = help: the trait `~const PartialEq` is not implemented for `str`
+    = help: the following other types implement trait `PartialEq<Rhs>`:
+              <str as PartialEq<Cow<'a, str>>>
+              <str as PartialEq<OsString>>
+              <str as PartialEq<OsStr>>
+              <str as PartialEq<String>>
+              <str as PartialEq>
+              <&'a str as PartialEq<OsString>>
+              <&'a str as PartialEq<String>>
+              <&'b str as PartialEq<Cow<'a, str>>>
- For more information about this error, try `rustc --explain E0015`.
+ error: aborting due to 1 previous error; 1 warning emitted
+ 
+ For more information about this error, try `rustc --explain E0277`.
+ For more information about this error, try `rustc --explain E0277`.
+ Future incompatibility report: Future breakage diagnostic:
+ warning: to use a constant of type `&str` in a pattern, the type must implement `PartialEq`
+   --> $DIR/match-non-const-eq.rs:7:9
+    |
+ LL |         "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in const contexts
+    |
+    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+    = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
+    = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
+    = note: `#[warn(const_patterns_without_partial_eq)]` on by default
14 


The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.stock/match-non-const-eq.stock.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs`

error in revision `stock`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "stock" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.stock" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.stock/auxiliary"
--- stderr -------------------------------
warning: to use a constant of type `&str` in a pattern, the type must implement `PartialEq`
##[warning]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs:7:9
   |
   |
LL |         "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in const contexts
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
   = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
   = note: `#[warn(const_patterns_without_partial_eq)]` on by default

error[E0277]: can't compare `str` with `str`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs:7:9
   |
LL |         "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in const contexts
   |         ^^^ no implementation for `str == str`
   |
   = help: the trait `~const PartialEq` is not implemented for `str`
   = help: the following other types implement trait `PartialEq<Rhs>`:
             <str as PartialEq<Cow<'a, str>>>
             <str as PartialEq<OsString>>
             <str as PartialEq<OsStr>>
             <str as PartialEq<String>>
             <str as PartialEq>
             <&'a str as PartialEq<OsString>>
             <&'a str as PartialEq<String>>
             <&'b str as PartialEq<Cow<'a, str>>>
error: aborting due to 1 previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0277`.
Future incompatibility report: Future breakage diagnostic:
Future incompatibility report: Future breakage diagnostic:
warning: to use a constant of type `&str` in a pattern, the type must implement `PartialEq`
##[warning]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs:7:9
   |
LL |         "a" => (), //FIXME [gated]~ ERROR can't compare `str` with `str` in const contexts
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
   = note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
   = note: `#[warn(const_patterns_without_partial_eq)]` on by default


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs stdout ----

---
--- stderr -------------------------------
error[E0119]: conflicting implementations of trait `Bar`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs:29:1
   |
LL | / impl<T> Bar for T
LL | |     T: Foo,
   | |___________- first implementation here
...
...
LL | / impl<T> const Bar for T
LL | | where
LL | |     T: ~const Foo,
LL | |     T: Specialize,
   | |__________________^ conflicting implementation
error: cannot specialize on trait `Foo`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs:51:8
   |
   |
LL |     T: ~const Foo,

error: aborting due to 2 previous errors

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


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs#stock stdout ----
diff of stderr:

- error[E0015]: cannot call non-const fn `<Vec<usize> as Default>::default` in constant functions
2   --> $DIR/std-impl-gate.rs:13:5
3    |
4 LL |     Default::default()


+    |     ^^^^^^^^^^^^^^^^^^ calling non-const function `<Vec<usize> as Default>::default`
+ note: inside `const_context`
+   --> $DIR/std-impl-gate.rs:13:5
+    |
+ LL |     Default::default()
+ LL |     Default::default()
5    |     ^^^^^^^^^^^^^^^^^^
+ note: inside `VAL`
+   --> $DIR/std-impl-gate.rs:18:29
6    |
-    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+ LL |     const VAL: Vec<usize> = const_context();
9 
10 error: aborting due to 1 previous error
11 

---
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.stock/std-impl-gate.stock.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs`

error in revision `stock`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "stock" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.stock" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.stock/auxiliary"
--- stderr -------------------------------
error[E0080]: evaluation of constant value failed
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs:13:5
   |
   |
LL |     Default::default()
   |     ^^^^^^^^^^^^^^^^^^ calling non-const function `<Vec<usize> as Default>::default`
note: inside `const_context`
  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs:13:5
   |
LL |     Default::default()
LL |     Default::default()
   |     ^^^^^^^^^^^^^^^^^^
note: inside `VAL`
  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs:18:29
   |
LL |     const VAL: Vec<usize> = const_context();

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0080`.
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `S: ~const Foo` is not satisfied
   |
   |
LL | impl const Bar for S {}
   |                    ^ the trait `~const Foo` is not implemented for `S`
   = help: the trait `Foo` is implemented for `S`
note: required by a bound in `Bar`
  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs:11:12
   |
   |
LL | trait Bar: ~const Foo {}
   |            ^^^^^^^^^^ required by this bound in `Bar`
error: aborting due to 1 previous error

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


---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.rs stdout ----
diff of stderr:

- error[E0015]: cannot call non-const fn `<staged_api::Unstable as staged_api::MyTrait>::func` in constant functions
+ error: `<staged_api::Unstable as staged_api::MyTrait>::func` is not yet stable as a const fn
3    |
4 LL |     Unstable::func();

5    |     ^^^^^^^^^^^^^^^^
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate/auxiliary"
stdout: none
--- stderr -------------------------------
error: `<staged_api::Unstable as staged_api::MyTrait>::func` is not yet stable as a const fn
   |
LL |     Unstable::func();
   |     ^^^^^^^^^^^^^^^^
   |
---

---- [ui] tests/ui/type-alias-impl-trait/issue-53096.rs stdout ----
diff of stderr:

- error: fatal error triggered by #[rustc_error]
+ error: const parameter `host` is part of concrete type but not used in parameter list for the `impl Trait` type alias
+   --> $DIR/issue-53096.rs:6:5
3    |
- LL | fn main() {}
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/issue-53096.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/type-alias-impl-trait/issue-53096.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/issue-53096" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/issue-53096/auxiliary"
--- stderr -------------------------------
error: const parameter `host` is part of concrete type but not used in parameter list for the `impl Trait` type alias
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/issue-53096.rs:6:5
   |
---
---- [ui] tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn/auxiliary"
--- stderr -------------------------------
error: const parameter `host` is part of concrete type but not used in parameter list for the `impl Trait` type alias
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs:12:9
   |
---
LL | |             return returning;
LL | |         }
   | |_________^
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 2 previous errors
------------------------------------------


@bors
Copy link
Contributor

bors commented Dec 27, 2023

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

@Dylan-DPC Dylan-DPC added S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. 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.

None yet

6 participants