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

fix trait implementations sort order #137428

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

Conversation

tapanprakasht
Copy link
Contributor

Fixes #135098

@rustbot
Copy link
Collaborator

rustbot commented Feb 22, 2025

r? @compiler-errors

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

Use r? to explicitly pick a reviewer

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

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

Click to see the possible cause of the failure (guessed by this bot)
#22 exporting to docker image format
#22 sending tarball 28.0s done
#22 DONE 33.8s
##[endgroup]
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-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Listening on address 127.0.0.1:4226
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--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', '--set', 'rust.lld=false', '--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-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---

failures:

---- [ui] tests/ui/binop/binop-mul-i32-f32.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/binop/binop-mul-i32-f32/binop-mul-i32-f32.stderr"


8    = help: the following other types implement trait `Mul<Rhs>`:
9              `&i32` implements `Mul<i32>`
10              `&i32` implements `Mul`
-              `i32` implements `Mul<&i32>`
12              `i32` implements `Mul`
+              `i32` implements `Mul<&i32>`
14 error: aborting due to 1 previous error
15 



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/binop/binop-mul-i32-f32.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/binop/binop-mul-i32-f32" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: cannot multiply `i32` by `f32`
   |
   |
LL |     x * y //~ ERROR cannot multiply `i32` by `f32`
   |       ^ no implementation for `i32 * f32`
   |
   = help: the trait `Mul<f32>` is not implemented for `i32`
   = help: the following other types implement trait `Mul<Rhs>`:
             `&i32` implements `Mul<i32>`
             `&i32` implements `Mul`
             `i32` implements `Mul`
             `i32` implements `Mul<&i32>`
error: aborting due to 1 previous error

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


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

247    |
248    = help: the trait `PartialEq<Foo>` is not implemented for `&&{integer}`
249    = help: the following other types implement trait `PartialEq<Rhs>`:
-              f16
-              f32
-              f64
-              i128
---
+              isize
+              i8
258            and 8 others
259 
260 error[E0369]: binary operation `==` cannot be applied to type `Foo`

305    = help: the following other types implement trait `BitAnd<Rhs>`:
306              `&i32` implements `BitAnd<i32>`
307              `&i32` implements `BitAnd`
-              `i32` implements `BitAnd<&i32>`
309              `i32` implements `BitAnd`
+              `i32` implements `BitAnd<&i32>`
311 error[E0277]: the size for values of type `str` cannot be known at compilation time
312   --> $DIR/binary-op-suggest-deref.rs:78:17



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args binop/binary-op-suggest-deref.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/binop/binary-op-suggest-deref.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/binop/binary-op-suggest-deref" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:6:12
   |
   |
LL |     if i < 0 {}
   |            ^ expected `&i64`, found integer
   |
help: consider dereferencing the borrow
   |
LL |     if *i < 0 {}


error[E0277]: can't compare `&&{integer}` with `{integer}`
   |
LL |     _ = foo == 0;
LL |     _ = foo == 0;
   |             ^^ no implementation for `&&{integer} == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&&{integer}`
   |
   |
LL |     _ = **foo == 0;


error[E0277]: can't compare `&{integer}` with `{integer}`
   |
LL |     _ = foo == &0;
LL |     _ = foo == &0;
   |             ^^ no implementation for `&{integer} == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&{integer}`
   = note: required for `&&{integer}` to implement `PartialEq<&{integer}>`
   |
   |
LL |     _ = *foo == &0;


error[E0277]: can't compare `&&&&&&{integer}` with `{integer}`
   |
   |
LL |     _ = &&&&foo == 0;
   |                 ^^ no implementation for `&&&&&&{integer} == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&&&&&&{integer}`
help: consider removing the borrows and dereferencing instead
   |
LL -     _ = &&&&foo == 0;
LL +     _ = **foo == 0;


error[E0277]: can't compare `&{integer}` with `{integer}`
   |
   |
LL |     _ = *foo == 0;
   |              ^^ no implementation for `&{integer} == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&{integer}`
   |
   |
LL |     _ = **foo == 0;


error[E0277]: can't compare `&&{integer}` with `{integer}`
   |
   |
LL |     _ = &&foo == &&0;
   |               ^^ no implementation for `&&{integer} == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&&{integer}`
   = note: required for `&&&{integer}` to implement `PartialEq<&{integer}>`
   = note: 1 redundant requirement hidden
   = note: required for `&&&&{integer}` to implement `PartialEq<&&{integer}>`
   |
   |
LL -     _ = &&foo == &&0;
LL +     _ = foo == &&0;


error[E0277]: can't compare `&Box<{integer}>` with `{integer}`
   |
LL |     _ = &Box::new(42) == 42;
LL |     _ = &Box::new(42) == 42;
   |                       ^^ no implementation for `&Box<{integer}> == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&Box<{integer}>`
help: consider removing the borrow and dereferencing instead
LL -     _ = &Box::new(42) == 42;
LL +     _ = *Box::new(42) == 42;
   |


error[E0277]: can't compare `&Box<&Box<&{integer}>>` with `{integer}`
   |
   |
LL |     _ = &Box::new(&Box::new(&42)) == 42;
   |                                   ^^ no implementation for `&Box<&Box<&{integer}>> == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&Box<&Box<&{integer}>>`
help: consider removing the borrow and dereferencing instead
   |
LL -     _ = &Box::new(&Box::new(&42)) == 42;
LL +     _ = ****Box::new(&Box::new(&42)) == 42;


error[E0277]: can't compare `{integer}` with `&&{integer}`
   |
   |
LL |     _ = 0 == foo;
   |           ^^ no implementation for `{integer} == &&{integer}`
   |
   = help: the trait `PartialEq<&&{integer}>` is not implemented for `{integer}`
   |
   |
LL |     _ = 0 == **foo;


error[E0277]: can't compare `{integer}` with `&{integer}`
   |
LL |     _ = &0 == foo;
LL |     _ = &0 == foo;
   |            ^^ no implementation for `{integer} == &{integer}`
   |
   = help: the trait `PartialEq<&{integer}>` is not implemented for `{integer}`
   = note: required for `&{integer}` to implement `PartialEq<&&{integer}>`
   |
   |
LL |     _ = &0 == *foo;


error[E0277]: can't compare `{integer}` with `&&&&&&{integer}`
   |
   |
LL |     _ = 0 == &&&&foo;
   |           ^^ no implementation for `{integer} == &&&&&&{integer}`
   |
   = help: the trait `PartialEq<&&&&&&{integer}>` is not implemented for `{integer}`
help: consider removing the borrows and dereferencing instead
   |
LL -     _ = 0 == &&&&foo;
LL +     _ = 0 == **foo;


error[E0277]: can't compare `{integer}` with `&{integer}`
   |
   |
LL |     _ = 0 == *foo;
   |           ^^ no implementation for `{integer} == &{integer}`
   |
   = help: the trait `PartialEq<&{integer}>` is not implemented for `{integer}`
   |
   |
LL |     _ = 0 == **foo;


error[E0277]: can't compare `{integer}` with `&&{integer}`
   |
   |
LL |     _ = &&0 == &&foo;
   |             ^^ no implementation for `{integer} == &&{integer}`
   |
   = help: the trait `PartialEq<&&{integer}>` is not implemented for `{integer}`
   = note: required for `&{integer}` to implement `PartialEq<&&&{integer}>`
   = note: 1 redundant requirement hidden
   = note: required for `&&{integer}` to implement `PartialEq<&&&&{integer}>`
   |
   |
LL -     _ = &&0 == &&foo;
LL +     _ = &&0 == foo;


error[E0277]: can't compare `Box<Box<{integer}>>` with `&&{integer}`
   |
   |
LL |     _ = &Box::new(Box::new(42)) == &foo;
   |                                 ^^ no implementation for `Box<Box<{integer}>> == &&{integer}`
   |
   = help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<Box<{integer}>>`
   = note: required for `&Box<Box<{integer}>>` to implement `PartialEq<&&&{integer}>`
help: consider dereferencing both sides of the expression
   |
LL -     _ = &Box::new(Box::new(42)) == &foo;
LL +     _ = **Box::new(Box::new(42)) == **foo;


error[E0277]: can't compare `Box<{integer}>` with `&&{integer}`
   |
   |
LL |     _ = &Box::new(42) == &foo;
   |                       ^^ no implementation for `Box<{integer}> == &&{integer}`
   |
   = help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<{integer}>`
   = note: required for `&Box<{integer}>` to implement `PartialEq<&&&{integer}>`
help: consider dereferencing both sides of the expression
   |
LL -     _ = &Box::new(42) == &foo;
LL +     _ = *Box::new(42) == **foo;


error[E0277]: can't compare `Box<Box<Box<Box<{integer}>>>>` with `&&{integer}`
   |
   |
LL |     _ = &Box::new(Box::new(Box::new(Box::new(42)))) == &foo;
   |                                                     ^^ no implementation for `Box<Box<Box<Box<{integer}>>>> == &&{integer}`
   |
   = help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<Box<Box<Box<{integer}>>>>`
   = note: required for `&Box<Box<Box<Box<{integer}>>>>` to implement `PartialEq<&&&{integer}>`
help: consider dereferencing both sides of the expression
   |
LL -     _ = &Box::new(Box::new(Box::new(Box::new(42)))) == &foo;
LL +     _ = ****Box::new(Box::new(Box::new(Box::new(42)))) == **foo;


error[E0277]: can't compare `&&{integer}` with `Box<Box<Box<Box<{integer}>>>>`
   |
   |
LL |     _ = &foo == &Box::new(Box::new(Box::new(Box::new(42))));
   |              ^^ no implementation for `&&{integer} == Box<Box<Box<Box<{integer}>>>>`
   |
   = help: the trait `PartialEq<Box<Box<Box<Box<{integer}>>>>>` is not implemented for `&&{integer}`
   = note: required for `&&&{integer}` to implement `PartialEq<&Box<Box<Box<Box<{integer}>>>>>`
help: consider dereferencing both sides of the expression
   |
LL -     _ = &foo == &Box::new(Box::new(Box::new(Box::new(42))));
LL +     _ = **foo == ****Box::new(Box::new(Box::new(Box::new(42))));

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

error[E0277]: can't compare `&&{integer}` with `Foo`
   |
   |
LL |     _ = &&0 == Foo;
   |             ^^ no implementation for `&&{integer} == Foo`
   |
   = help: the trait `PartialEq<Foo>` is not implemented for `&&{integer}`
   = help: the following other types implement trait `PartialEq<Rhs>`:
             u8
             u16
             u32
             u64
             u64
             u128
             isize
             i8
           and 8 others

error[E0369]: binary operation `==` cannot be applied to type `Foo`
   |
LL |     _ = Foo == &&0;
LL |     _ = Foo == &&0;
   |         --- ^^ --- &&{integer}
   |         Foo
   |
   |
note: an implementation of `PartialEq<&&{integer}>` might be missing for `Foo`
   |
LL |     struct Foo;
LL |     struct Foo;
   |     ^^^^^^^^^^ must implement `PartialEq<&&{integer}>`
error[E0277]: can't compare `&String` with `str`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:69:20
   |
   |
LL |     _ = string_ref == partial[..3];
   |                    ^^ no implementation for `&String == str`
   = help: the trait `PartialEq<str>` is not implemented for `&String`
help: consider dereferencing here
   |
   |
LL |     _ = *string_ref == partial[..3];

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


error[E0277]: no implementation for `i32 & str`
   |
   |
LL |     let _ = FOO & (*"Sized".to_string().into_boxed_str());
   |                 ^ no implementation for `i32 & str`
   = help: the trait `BitAnd<str>` is not implemented for `i32`
   = help: the trait `BitAnd<str>` is not implemented for `i32`
   = help: the following other types implement trait `BitAnd<Rhs>`:
             `&i32` implements `BitAnd<i32>`
             `&i32` implements `BitAnd`
             `i32` implements `BitAnd`
             `i32` implements `BitAnd<&i32>`
error[E0277]: the size for values of type `str` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:78:17
   |
   |
LL |     let _ = FOO & (*"Sized".to_string().into_boxed_str());
   |
   = help: the trait `Sized` is not implemented for `str`

error: aborting due to 24 previous errors
---
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/binop/shift-various-bad-types/shift-various-bad-types.stderr"
diff of stderr:

6    |
7    = help: the trait `Shr<char>` is not implemented for `{integer}`
8    = help: the following other types implement trait `Shr<Rhs>`:
-              `&i128` implements `Shr<&i16>`
-              `&i128` implements `Shr<&i32>`
-              `&i128` implements `Shr<&i64>`
-              `&i128` implements `Shr<&i8>`
-              `&i128` implements `Shr<&isize>`
-              `&i128` implements `Shr<&u128>`
-              `&i128` implements `Shr<&u16>`
-              `&i128` implements `Shr<&u32>`
+              `&u8` implements `Shr<u8>`
+              `&u8` implements `Shr`
+              `&u8` implements `Shr<u16>`
+              `&u8` implements `Shr<&u16>`
+              `&u8` implements `Shr<u32>`
+              `&u8` implements `Shr<&u32>`
+              `&u8` implements `Shr<u64>`
+              `&u8` implements `Shr<&u64>`
18 
18 
19 error[E0277]: no implementation for `{integer} >> &str`
24    |
24    |
25    = help: the trait `Shr<&str>` is not implemented for `{integer}`
26    = help: the following other types implement trait `Shr<Rhs>`:
-              `&i128` implements `Shr<&i16>`
-              `&i128` implements `Shr<&i32>`
-              `&i128` implements `Shr<&i64>`
-              `&i128` implements `Shr<&i8>`
-              `&i128` implements `Shr<&isize>`
-              `&i128` implements `Shr<&u128>`
-              `&i128` implements `Shr<&u16>`
-              `&i128` implements `Shr<&u32>`
+              `&u8` implements `Shr<u8>`
+              `&u8` implements `Shr`
+              `&u8` implements `Shr<u16>`
+              `&u8` implements `Shr<&u16>`
+              `&u8` implements `Shr<u32>`
+              `&u8` implements `Shr<&u32>`
+              `&u8` implements `Shr<u64>`
+              `&u8` implements `Shr<&u64>`
36 
36 
37 error[E0277]: no implementation for `{integer} >> &Panolpy`
42    |
42    |
43    = help: the trait `Shr<&Panolpy>` is not implemented for `{integer}`
44    = help: the following other types implement trait `Shr<Rhs>`:
-              `&i128` implements `Shr<&i16>`
-              `&i128` implements `Shr<&i32>`
-              `&i128` implements `Shr<&i64>`
-              `&i128` implements `Shr<&i8>`
-              `&i128` implements `Shr<&isize>`
-              `&i128` implements `Shr<&u128>`
-              `&i128` implements `Shr<&u16>`
-              `&i128` implements `Shr<&u32>`
+              `&u8` implements `Shr<u8>`
+              `&u8` implements `Shr`
+              `&u8` implements `Shr<u16>`
+              `&u8` implements `Shr<&u16>`
+              `&u8` implements `Shr<u32>`
+              `&u8` implements `Shr<&u32>`
+              `&u8` implements `Shr<u64>`
+              `&u8` implements `Shr<&u64>`
54 
55 error[E0308]: mismatched types



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args binop/shift-various-bad-types.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/binop/shift-various-bad-types.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/binop/shift-various-bad-types" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: no implementation for `{integer} >> char`
   |
LL |     22 >> p.char;
LL |     22 >> p.char;
   |        ^^ no implementation for `{integer} >> char`
   |
   = help: the trait `Shr<char>` is not implemented for `{integer}`
   = help: the following other types implement trait `Shr<Rhs>`:
             `&u8` implements `Shr<u8>`
             `&u8` implements `Shr`
             `&u8` implements `Shr<u16>`
             `&u8` implements `Shr<&u16>`
             `&u8` implements `Shr<u32>`
             `&u8` implements `Shr<&u32>`
             `&u8` implements `Shr<u64>`
             `&u8` implements `Shr<&u64>`


error[E0277]: no implementation for `{integer} >> &str`
   |
LL |     22 >> p.str;
LL |     22 >> p.str;
   |        ^^ no implementation for `{integer} >> &str`
   |
   = help: the trait `Shr<&str>` is not implemented for `{integer}`
   = help: the following other types implement trait `Shr<Rhs>`:
             `&u8` implements `Shr<u8>`
             `&u8` implements `Shr`
             `&u8` implements `Shr<u16>`
             `&u8` implements `Shr<&u16>`
             `&u8` implements `Shr<u32>`
             `&u8` implements `Shr<&u32>`
             `&u8` implements `Shr<u64>`
             `&u8` implements `Shr<&u64>`


error[E0277]: no implementation for `{integer} >> &Panolpy`
   |
LL |     22 >> p;
LL |     22 >> p;
   |        ^^ no implementation for `{integer} >> &Panolpy`
   |
   = help: the trait `Shr<&Panolpy>` is not implemented for `{integer}`
   = help: the following other types implement trait `Shr<Rhs>`:
             `&u8` implements `Shr<u8>`
             `&u8` implements `Shr`
             `&u8` implements `Shr<u16>`
             `&u8` implements `Shr<&u16>`
             `&u8` implements `Shr<u32>`
             `&u8` implements `Shr<&u32>`
             `&u8` implements `Shr<u64>`
             `&u8` implements `Shr<&u64>`

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/binop/shift-various-bad-types.rs:25:18
   |
   |
LL |     let _: i32 = 22_i64 >> 1_i32;
   |            ---   ^^^^^^^^^^^^^^^ expected `i32`, found `i64`
   |            expected due to this
   |
help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit
   |
   |
LL |     let _: i32 = (22_i64 >> 1_i32).try_into().unwrap();

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0277, E0308.
---
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/exhaustive-value/exhaustive-value.stderr"
diff of stderr:

6    |
7    = help: the following other types implement trait `Foo<N>`:
8              `()` implements `Foo<0>`
-              `()` implements `Foo<100>`
-              `()` implements `Foo<101>`
-              `()` implements `Foo<102>`
-              `()` implements `Foo<103>`
-              `()` implements `Foo<104>`
-              `()` implements `Foo<105>`
-              `()` implements `Foo<106>`
+              `()` implements `Foo<1>`
+              `()` implements `Foo<2>`
+              `()` implements `Foo<3>`
+              `()` implements `Foo<4>`
+              `()` implements `Foo<5>`
+              `()` implements `Foo<6>`
+              `()` implements `Foo<7>`
17 
18 error: aborting due to 1 previous error



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/const-generics/exhaustive-value.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/exhaustive-value" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `(): Foo<N>` is not satisfied
   |
   |
LL |     <() as Foo<N>>::test() //~ ERROR the trait bound `(): Foo<N>`
   |      ^^ the trait `Foo<N>` is not implemented for `()`
   = help: the following other types implement trait `Foo<N>`:
   = help: the following other types implement trait `Foo<N>`:
             `()` implements `Foo<0>`
             `()` implements `Foo<1>`
             `()` implements `Foo<2>`
             `()` implements `Foo<3>`
             `()` implements `Foo<4>`
             `()` implements `Foo<5>`
             `()` implements `Foo<6>`
             `()` implements `Foo<7>`

error: aborting due to 1 previous error

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

5    |     ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `[u16; 3]`
6    |
7    = help: the following other types implement trait `Bar`:
-              [[u16; 3]; 3]
9              [u16; 4]
+              [[u16; 3]; 3]
11 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
12    |


20    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
22    = help: the following other types implement trait `Bar`:
22    = help: the following other types implement trait `Bar`:
-              [[u16; 3]; 3]
24              [u16; 4]
+              [[u16; 3]; 3]
26 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
27    |

35    |      ^^^ the trait `Bar` is not implemented for `[u16; 3]`
35    |      ^^^ the trait `Bar` is not implemented for `[u16; 3]`
36    |
37    = help: the following other types implement trait `Bar`:
-              [[u16; 3]; 3]
39              [u16; 4]
+              [[u16; 3]; 3]
41   --> $DIR/issue-67185-2.rs:15:25
42    |


53    |      ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
55    = help: the following other types implement trait `Bar`:
55    = help: the following other types implement trait `Bar`:
-              [[u16; 3]; 3]
57              [u16; 4]
+              [[u16; 3]; 3]
59   --> $DIR/issue-67185-2.rs:14:30
60    |


71    |              ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
73    = help: the following other types implement trait `Bar`:
73    = help: the following other types implement trait `Bar`:
-              [[u16; 3]; 3]
75              [u16; 4]
+              [[u16; 3]; 3]
77   --> $DIR/issue-67185-2.rs:14:30
78    |

89    |              ^^^ the trait `Bar` is not implemented for `[u16; 3]`
89    |              ^^^ the trait `Bar` is not implemented for `[u16; 3]`
90    |
91    = help: the following other types implement trait `Bar`:
-              [[u16; 3]; 3]
93              [u16; 4]
+              [[u16; 3]; 3]
95   --> $DIR/issue-67185-2.rs:15:25
96    |



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/const-generics/issues/issue-67185-2.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issues/issue-67185-2" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
   |
   |
LL |     <u8 as Baz>::Quaks: Bar,  //~ ERROR the trait bound `[u16; 3]: Bar` is not satisfied [E0277]
   |     ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `[u16; 3]`
   = help: the following other types implement trait `Bar`:
             [u16; 4]
             [u16; 4]
             [[u16; 3]; 3]
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |
   |

error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
   |
   |
LL |     [<u8 as Baz>::Quaks; 2]: Bar, //~ ERROR the trait bound `[[u16; 3]; 2]: Bar` is not satisfied [E0277]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
   = help: the following other types implement trait `Bar`:
             [u16; 4]
             [u16; 4]
             [[u16; 3]; 3]
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |
   |

error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
   |
LL | impl Foo for FooImpl {}
   |      ^^^ the trait `Bar` is not implemented for `[u16; 3]`
   |
   |
   = help: the following other types implement trait `Bar`:
             [u16; 4]
             [[u16; 3]; 3]
  --> /checkout/tests/ui/const-generics/issues/issue-67185-2.rs:15:25
   |
LL | trait Foo
   |       --- required by a bound in this trait
   |       --- required by a bound in this trait
...
LL |     <u8 as Baz>::Quaks: Bar,  //~ ERROR the trait bound `[u16; 3]: Bar` is not satisfied [E0277]


error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
   |
LL | impl Foo for FooImpl {}
LL | impl Foo for FooImpl {}
   |      ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
   = help: the following other types implement trait `Bar`:
             [u16; 4]
             [u16; 4]
             [[u16; 3]; 3]
  --> /checkout/tests/ui/const-generics/issues/issue-67185-2.rs:14:30
   |
LL | trait Foo
   |       --- required by a bound in this trait
   |       --- required by a bound in this trait
LL | where
LL |     [<u8 as Baz>::Quaks; 2]: Bar, //~ ERROR the trait bound `[[u16; 3]; 2]: Bar` is not satisfied [E0277]


error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
   |
   |
LL | fn f(_: impl Foo) {}
   |              ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
   = help: the following other types implement trait `Bar`:
             [u16; 4]
             [u16; 4]
             [[u16; 3]; 3]
  --> /checkout/tests/ui/const-generics/issues/issue-67185-2.rs:14:30
   |
LL | trait Foo
   |       --- required by a bound in this trait
   |       --- required by a bound in this trait
LL | where
LL |     [<u8 as Baz>::Quaks; 2]: Bar, //~ ERROR the trait bound `[[u16; 3]; 2]: Bar` is not satisfied [E0277]


error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
   |
   |
LL | fn f(_: impl Foo) {}
   |              ^^^ the trait `Bar` is not implemented for `[u16; 3]`
   = help: the following other types implement trait `Bar`:
             [u16; 4]
             [u16; 4]
             [[u16; 3]; 3]
  --> /checkout/tests/ui/const-generics/issues/issue-67185-2.rs:15:25
   |
LL | trait Foo
   |       --- required by a bound in this trait
   |       --- required by a bound in this trait
...
LL |     <u8 as Baz>::Quaks: Bar,  //~ ERROR the trait bound `[u16; 3]: Bar` is not satisfied [E0277]

error: aborting due to 6 previous errors

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


---- [ui] tests/ui/consts/const-eval/const-eval-overflow-4b.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-eval/const-eval-overflow-4b/const-eval-overflow-4b.stderr"
diff of stderr:

14    = help: the following other types implement trait `Add<Rhs>`:
15              `&i8` implements `Add<i8>`
16              `&i8` implements `Add`
-              `i8` implements `Add<&i8>`
18              `i8` implements `Add`
+              `i8` implements `Add<&i8>`
19 
20 error[E0604]: only `u8` can be cast as `char`, not `i8`


The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args consts/const-eval/const-eval-overflow-4b.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/const-eval/const-eval-overflow-4b.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-eval/const-eval-overflow-4b" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/consts/const-eval/const-eval-overflow-4b.rs:9:30
   |
   |
LL |     : [u32; (i8::MAX as i8 + 1u8) as usize]
   |                              ^^^ expected `i8`, found `u8`
error[E0277]: cannot add `u8` to `i8`
##[error]  --> /checkout/tests/ui/consts/const-eval/const-eval-overflow-4b.rs:9:28
   |
   |
LL |     : [u32; (i8::MAX as i8 + 1u8) as usize]
   |                            ^ no implementation for `i8 + u8`
   = help: the trait `Add<u8>` is not implemented for `i8`
   = help: the trait `Add<u8>` is not implemented for `i8`
   = help: the following other types implement trait `Add<Rhs>`:
             `&i8` implements `Add<i8>`
             `&i8` implements `Add`
             `i8` implements `Add`
             `i8` implements `Add<&i8>`

error[E0604]: only `u8` can be cast as `char`, not `i8`
   |
LL |     : [u32; 5i8 as char as usize]
   |             ^^^^^^^^^^^ invalid cast
   |
---
---- [ui] tests/ui/consts/const-eval/const-eval-overflow-3b.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-eval/const-eval-overflow-3b/const-eval-overflow-3b.stderr"
diff of stderr:

14    = help: the following other types implement trait `Add<Rhs>`:
15              `&i8` implements `Add<i8>`
16              `&i8` implements `Add`
-              `i8` implements `Add<&i8>`
18              `i8` implements `Add`
+              `i8` implements `Add<&i8>`
20 error: aborting due to 2 previous errors
21 



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/const-eval/const-eval-overflow-3b.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-eval/const-eval-overflow-3b" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/consts/const-eval/const-eval-overflow-3b.rs:16:22
   |
   |
LL |     = [0; (i8::MAX + 1u8) as usize];
   |                      ^^^ expected `i8`, found `u8`
error[E0277]: cannot add `u8` to `i8`
##[error]  --> /checkout/tests/ui/consts/const-eval/const-eval-overflow-3b.rs:16:20
   |
   |
LL |     = [0; (i8::MAX + 1u8) as usize];
   |                    ^ no implementation for `i8 + u8`
   = help: the trait `Add<u8>` is not implemented for `i8`
   = help: the trait `Add<u8>` is not implemented for `i8`
   = help: the following other types implement trait `Add<Rhs>`:
             `&i8` implements `Add<i8>`
             `&i8` implements `Add`
             `i8` implements `Add`
             `i8` implements `Add<&i8>`
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
---
To only update this specific test, also pass `--test-args consts/missing-larger-array-impl.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/missing-larger-array-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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/missing-larger-array-impl" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `[X; 35]: Default` is not satisfied
   |
   |
LL |     <[X; 35] as Default>::default();
   |      ^^^^^^^ the trait `Default` is not implemented for `[X; 35]`
   = help: the following other types implement trait `Default`:
             &[T]
             [T; 32]
             [T; 31]
---
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/too_generic_eval_ice/too_generic_eval_ice.stderr"
diff of stderr:

30    |
31    = help: the trait `PartialEq<[{integer}; 0]>` is not implemented for `[{integer}; Self::HOST_SIZE]`
32    = help: the following other types implement trait `PartialEq<Rhs>`:
-              `&[T]` implements `PartialEq<Vec<U, A>>`
34              `&[T]` implements `PartialEq<[U; N]>`
-              `&[u8; N]` implements `PartialEq<ByteStr>`
-              `&[u8; N]` implements `PartialEq<ByteString>`
37              `&[u8]` implements `PartialEq<ByteStr>`
+              `&[u8; N]` implements `PartialEq<ByteStr>`
38              `&[u8]` implements `PartialEq<ByteString>`
-              `&mut [T]` implements `PartialEq<Vec<U, A>>`
+              `&[u8; N]` implements `PartialEq<ByteString>`
+              `&[T]` implements `PartialEq<Vec<U, A>>`
40              `&mut [T]` implements `PartialEq<[U; N]>`
+              `&mut [T]` implements `PartialEq<Vec<U, A>>`
42 
43 error: aborting due to 4 previous errors



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/too_generic_eval_ice.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/too_generic_eval_ice" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/consts/too_generic_eval_ice.rs:7:13
   |
   |
LL |         [5; Self::HOST_SIZE] == [6; 0]
   |
   = note: this may fail depending on what value the parameter takes

error: constant expression depends on a generic parameter
error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/consts/too_generic_eval_ice.rs:7:9
   |
LL |         [5; Self::HOST_SIZE] == [6; 0]
   |
   = note: this may fail depending on what value the parameter takes

error: constant expression depends on a generic parameter
error: constant expression depends on a generic parameter
##[error]  --> /checkout/tests/ui/consts/too_generic_eval_ice.rs:7:30
   |
LL |         [5; Self::HOST_SIZE] == [6; 0]
   |
   = note: this may fail depending on what value the parameter takes


error[E0277]: can't compare `[{integer}; Self::HOST_SIZE]` with `[{integer}; 0]`
   |
   |
LL |         [5; Self::HOST_SIZE] == [6; 0]
   |                              ^^ no implementation for `[{integer}; Self::HOST_SIZE] == [{integer}; 0]`
   |
   = help: the trait `PartialEq<[{integer}; 0]>` is not implemented for `[{integer}; Self::HOST_SIZE]`
   = help: the following other types implement trait `PartialEq<Rhs>`:
             `&[T]` implements `PartialEq<[U; N]>`
             `&[u8]` implements `PartialEq<ByteStr>`
             `&[u8; N]` implements `PartialEq<ByteStr>`
             `&[u8]` implements `PartialEq<ByteString>`
             `&[u8; N]` implements `PartialEq<ByteString>`
             `&[T]` implements `PartialEq<Vec<U, A>>`
             `&mut [T]` implements `PartialEq<[U; N]>`
             `&mut [T]` implements `PartialEq<Vec<U, A>>`

error: aborting due to 4 previous errors

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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/deriving/issue-103157.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/deriving/issue-103157" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `f64: Eq` is not satisfied
   |
LL | #[derive(PartialEq, Eq)]
   |                     -- in this derive macro expansion
...
...
LL |     Float(Option<f64>), //~ ERROR the trait bound `f64: Eq` is not satisfied
   |           ^^^^^^^^^^^ the trait `Eq` is not implemented for `f64`
   = help: the following other types implement trait `Eq`:
             usize
             u8
             u16
---
To only update this specific test, also pass `--test-args did_you_mean/issue-21659-show-relevant-trait-impls-2.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: the trait bound `Bar: Foo<usize>` is not satisfied
##[error]  --> /checkout/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.rs:28:12
   |
   |
LL |     f1.foo(1usize);
   |        --- ^^^^^^ the trait `Foo<usize>` is not implemented for `Bar`
   |        required by a bound introduced by this call
   |
   = help: the following other types implement trait `Foo<A>`:
             `Bar` implements `Foo<i8>`
---
diff of stderr:

7    |     required by a bound introduced by this call
8    |
9    = help: the following other types implement trait `Foo<B>`:
-              `i8` implements `Foo<bool>`
+              `i8` implements `Foo<u8>`
11              `i8` implements `Foo<u16>`
12              `i8` implements `Foo<u32>`
13              `i8` implements `Foo<u64>`
-              `i8` implements `Foo<u8>`
-              `i8` implements `Foo<u8>`
+              `i8` implements `Foo<bool>`
15 
16 error[E0277]: the trait bound `u8: Foo<i32>` is not satisfied

22    |     required by a bound introduced by this call
23    |
24    = help: the following other types implement trait `Foo<B>`:
24    = help: the following other types implement trait `Foo<B>`:
-              `u8` implements `Foo<bool>`
26              `u8` implements `Foo<u16>`
27              `u8` implements `Foo<u32>`
28              `u8` implements `Foo<u64>`

+              `u8` implements `Foo<bool>`
30 error[E0277]: the trait bound `bool: Foo<i32>` is not satisfied
31   --> $DIR/issue-39802-show-5-trait-impls.rs:26:21

36    |     required by a bound introduced by this call
36    |     required by a bound introduced by this call
37    |
38    = help: the following other types implement trait `Foo<B>`:
-              `bool` implements `Foo<bool>`
-              `bool` implements `Foo<i8>`
+              `bool` implements `Foo<u8>`
41              `bool` implements `Foo<u16>`
42              `bool` implements `Foo<u32>`
43              `bool` implements `Foo<u64>`
-              `bool` implements `Foo<u8>`
-              `bool` implements `Foo<u8>`
+              `bool` implements `Foo<bool>`
+              `bool` implements `Foo<i8>`
46 error: aborting due to 3 previous errors
47 



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args did_you_mean/issue-39802-show-5-trait-impls.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/did_you_mean/issue-39802-show-5-trait-impls.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/did_you_mean/issue-39802-show-5-trait-impls" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `i8: Foo<i32>` is not satisfied
   |
   |
LL |     Foo::<i32>::bar(&1i8); //~ ERROR is not satisfied
   |     --------------- ^^^^ the trait `Foo<i32>` is not implemented for `i8`
   |     required by a bound introduced by this call
   |
   = help: the following other types implement trait `Foo<B>`:
             `i8` implements `Foo<u8>`
             `i8` implements `Foo<u8>`
             `i8` implements `Foo<u16>`
             `i8` implements `Foo<u32>`
             `i8` implements `Foo<u64>`
             `i8` implements `Foo<bool>`

error[E0277]: the trait bound `u8: Foo<i32>` is not satisfied
   |
   |
LL |     Foo::<i32>::bar(&1u8); //~ ERROR is not satisfied
   |     --------------- ^^^^ the trait `Foo<i32>` is not implemented for `u8`
   |     required by a bound introduced by this call
   |
   = help: the following other types implement trait `Foo<B>`:
             `u8` implements `Foo<u16>`
             `u8` implements `Foo<u16>`
             `u8` implements `Foo<u32>`
             `u8` implements `Foo<u64>`
             `u8` implements `Foo<bool>`
error[E0277]: the trait bound `bool: Foo<i32>` is not satisfied
##[error]  --> /checkout/tests/ui/did_you_mean/issue-39802-show-5-trait-impls.rs:26:21
   |
   |
LL |     Foo::<i32>::bar(&true); //~ ERROR is not satisfied
   |     --------------- ^^^^^ the trait `Foo<i32>` is not implemented for `bool`
   |     required by a bound introduced by this call
   |
   = help: the following other types implement trait `Foo<B>`:
             `bool` implements `Foo<u8>`
             `bool` implements `Foo<u8>`
             `bool` implements `Foo<u16>`
             `bool` implements `Foo<u32>`
             `bool` implements `Foo<u64>`
             `bool` implements `Foo<bool>`
             `bool` implements `Foo<i8>`
error: aborting due to 3 previous errors

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


---- [ui] tests/ui/editions/never-type-fallback-breaking.rs#e2024 stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/editions/never-type-fallback-breaking.e2024/never-type-fallback-breaking.e2024.stderr"


28    |     ^^^^^^^ the trait `From<!>` is not implemented for `()`
30    = help: the following other types implement trait `From<T>`:
30    = help: the following other types implement trait `From<T>`:
+              `(T,)` implements `From<[T; 1]>`
31              `(T, T)` implements `From<[T; 2]>`
32              `(T, T, T)` implements `From<[T; 3]>`
33              `(T, T, T, T)` implements `From<[T; 4]>`

35              `(T, T, T, T, T, T)` implements `From<[T; 6]>`
36              `(T, T, T, T, T, T, T)` implements `From<[T; 7]>`
37              `(T, T, T, T, T, T, T, T)` implements `From<[T; 8]>`
-              `(T, T, T, T, T, T, T, T, T)` implements `From<[T; 9]>`
40    = note: required for `!` to implement `Into<()>`
41 note: required by a bound in `help`



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args editions/never-type-fallback-breaking.rs`

error in revision `e2024`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/editions/never-type-fallback-breaking.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "e2024" "--check-cfg" "cfg(test,FALSE,e2021,e2024)" "--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/editions/never-type-fallback-breaking.e2024" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2024"
--- stderr -------------------------------
error[E0277]: the trait bound `!: Default` is not satisfied
##[error]  --> /checkout/tests/ui/editions/never-type-fallback-breaking.rs:22:17
   |
---
   = help: did you intend to use the type `()` here instead?
note: required by a bound in `deserialize`
  --> /checkout/tests/ui/editions/never-type-fallback-breaking.rs:33:23
   |
LL |     fn deserialize<T: Default>() -> Option<T> {


error[E0277]: the trait bound `(): From<!>` is not satisfied
   |
LL |     help(1)?;
LL |     help(1)?;
   |     ^^^^^^^ the trait `From<!>` is not implemented for `()`
   = help: the following other types implement trait `From<T>`:
   = help: the following other types implement trait `From<T>`:
             `(T,)` implements `From<[T; 1]>`
             `(T, T)` implements `From<[T; 2]>`
             `(T, T, T)` implements `From<[T; 3]>`
             `(T, T, T, T)` implements `From<[T; 4]>`
             `(T, T, T, T, T)` implements `From<[T; 5]>`
             `(T, T, T, T, T, T)` implements `From<[T; 6]>`
             `(T, T, T, T, T, T, T)` implements `From<[T; 7]>`
             `(T, T, T, T, T, T, T, T)` implements `From<[T; 8]>`
   = note: required for `!` to implement `Into<()>`
note: required by a bound in `help`
  --> /checkout/tests/ui/editions/never-type-fallback-breaking.rs:44:20
   |
   |
LL | fn help<'a: 'a, T: Into<()>, U>(_: U) -> Result<T, ()> {
   |                    ^^^^^^^^ required by this bound in `help`
error[E0277]: the trait bound `!: Default` is not satisfied
##[error]  --> /checkout/tests/ui/editions/never-type-fallback-breaking.rs:62:19
   |
   |
LL |     takes_apit(|| Default::default())?;
   |
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?


error[E0277]: the trait bound `!: Default` is not satisfied
##[error]  --> /checkout/tests/ui/editions/never-type-fallback-breaking.rs:76:17
   |
LL |     takes_apit2(mk()?);
   |     |
   |     required by a bound introduced by this call
   |
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?
note: required by a bound in `takes_apit2`
  --> /checkout/tests/ui/editions/never-type-fallback-breaking.rs:71:25
   |
LL | fn takes_apit2(_x: impl Default) {}
   |                         ^^^^^^^ required by this bound in `takes_apit2`
error: aborting due to 5 previous errors

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


---- [ui] tests/ui/impl-trait/equality.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/equality/equality.stderr"
diff of stderr:

33    = help: the following other types implement trait `Add<Rhs>`:
34              `&u32` implements `Add<u32>`
35              `&u32` implements `Add`
-              `u32` implements `Add<&u32>`
37              `u32` implements `Add`
+              `u32` implements `Add<&u32>`
39 error: aborting due to 2 previous errors; 1 warning emitted
40 



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/impl-trait/equality.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/equality" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
##[warning]  --> /checkout/tests/ui/impl-trait/equality.rs:1:12
   |
   |
LL | #![feature(specialization)] //~ WARN the feature `specialization` is incomplete
   |
   = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
   = help: consider using `min_specialization` instead, which is more stable and complete
   = note: `#[warn(incomplete_features)]` on by default
   = note: `#[warn(incomplete_features)]` on by default

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/impl-trait/equality.rs:15:5
   |
LL | fn two(x: bool) -> impl Foo {
   |                    -------- expected `i32` because of return type
LL |     0_u32
   |     ^^^^^ expected `i32`, found `u32`
   |
help: change the type of the numeric literal from `u32` to `i32`
---

error[E0277]: cannot add `impl Foo` to `u32`
##[error]  --> /checkout/tests/ui/impl-trait/equality.rs:24:11
   |
LL |         n + sum_to(n - 1)
   |           ^ no implementation for `u32 + impl Foo`
   |
   = help: the trait `Add<impl Foo>` is not implemented for `u32`
   = help: the following other types implement trait `Add<Rhs>`:
             `&u32` implements `Add<u32>`
             `&u32` implements `Add`
             `u32` implements `Add`
             `u32` implements `Add<&u32>`
error: aborting due to 2 previous errors; 1 warning emitted

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
---
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/inference/issue-72616/issue-72616.stderr"
diff of stderr:

8    |
9    = note: cannot satisfy `String: PartialEq<_>`
10    = help: the following types implement trait `PartialEq<Rhs>`:
-              `String` implements `PartialEq<&str>`
-              `String` implements `PartialEq<ByteStr>`
13              `String` implements `PartialEq<ByteString>`
-              `String` implements `PartialEq<Cow<'_, str>>`
-              `String` implements `PartialEq<str>`
+              `String` implements `PartialEq<ByteStr>`
16              `String` implements `PartialEq`
+              `String` implements `PartialEq<str>`
+              `String` implements `PartialEq<&str>`
+              `String` implements `PartialEq<Cow<'_, str>>`
18    |
18    |
19 LL -         if String::from("a") == "a".try_into().unwrap() {}

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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/inference/issue-72616.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/inference/issue-72616" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0283]: type annotations needed
##[error]  --> /checkout/tests/ui/inference/issue-72616.rs:22:37
   |
   |
LL |         if String::from("a") == "a".try_into().unwrap() {}
   |                              |
   |                              type must be known at this point
   |
   = note: cannot satisfy `String: PartialEq<_>`
   = note: cannot satisfy `String: PartialEq<_>`
   = help: the following types implement trait `PartialEq<Rhs>`:
             `String` implements `PartialEq<ByteString>`
             `String` implements `PartialEq<ByteStr>`
             `String` implements `PartialEq`
             `String` implements `PartialEq<str>`
             `String` implements `PartialEq<&str>`
             `String` implements `PartialEq<Cow<'_, str>>`
   |
   |
LL -         if String::from("a") == "a".try_into().unwrap() {}
LL +         if String::from("a") == <&str as TryInto<T>>::try_into("a").unwrap() {}

error[E0283]: type annotations needed
##[error]  --> /checkout/tests/ui/inference/issue-72616.rs:22:37
   |
   |
LL |         if String::from("a") == "a".try_into().unwrap() {}
   |
   |
   = note: multiple `impl`s satisfying `_: TryFrom<&str>` found in the following crates: `core`, `std`:
           - impl TryFrom<&str> for std::sys::net::connection::socket::LookupHost;
           - impl<T, U> TryFrom<U> for T
             where U: Into<T>;
   = note: required for `&str` to implement `TryInto<_>`
   |
   |
LL -         if String::from("a") == "a".try_into().unwrap() {}
LL +         if String::from("a") == <&str as TryInto<T>>::try_into("a").unwrap() {}

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0283`.
---
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-11771/issue-11771.stderr"
diff of stderr:

6    |
7    = help: the trait `Add<()>` is not implemented for `{integer}`
8    = help: the following other types implement trait `Add<Rhs>`:
-              `&f128` implements `Add<f128>`
-              `&f128` implements `Add`
-              `&f16` implements `Add<f16>`
-              `&f16` implements `Add`
-              `&f32` implements `Add<f32>`
-              `&f32` implements `Add`
-              `&f64` implements `Add<f64>`
-              `&f64` implements `Add`
+              `&usize` implements `Add<usize>`
+              `&usize` implements `Add`
+              `&u8` implements `Add<u8>`
+              `&u8` implements `Add`
+              `&u16` implements `Add<u16>`
+              `&u16` implements `Add`
+              `&u32` implements `Add<u32>`
+              `&u32` implements `Add`
18 
19 error[E0277]: cannot add `()` to `{integer}`

24    |
24    |
25    = help: the trait `Add<()>` is not implemented for `{integer}`
26    = help: the following other types implement trait `Add<Rhs>`:
-              `&f128` implements `Add<f128>`
-              `&f128` implements `Add`
-              `&f16` implements `Add<f16>`
-              `&f16` implements `Add`
-              `&f32` implements `Add<f32>`
-              `&f32` implements `Add`
-              `&f64` implements `Add<f64>`
-              `&f64` implements `Add`
+              `&usize` implements `Add<usize>`
+              `&usize` implements `Add`
+              `&u8` implements `Add<u8>`
+              `&u8` implements `Add`
+              `&u16` implements `Add<u16>`
+              `&u16` implements `Add`
+              `&u32` implements `Add<u32>`
+              `&u32` implements `Add`
36 
37 error: aborting due to 2 previous errors



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/issues/issue-11771.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-11771" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: cannot add `()` to `{integer}`
##[error]  --> /checkout/tests/ui/issues/issue-11771.rs:3:7
   |
   |
LL |     1 +
   |       ^ no implementation for `{integer} + ()`
   |
   = help: the trait `Add<()>` is not implemented for `{integer}`
   = help: the following other types implement trait `Add<Rhs>`:
             `&usize` implements `Add<usize>`
             `&usize` implements `Add`
             `&u8` implements `Add<u8>`
             `&u8` implements `Add`
             `&u16` implements `Add<u16>`
             `&u16` implements `Add`
             `&u32` implements `Add<u32>`
             `&u32` implements `Add`

error[E0277]: cannot add `()` to `{integer}`
##[error]  --> /checkout/tests/ui/issues/issue-11771.rs:8:7
   |
   |
LL |     1 +
   |       ^ no implementation for `{integer} + ()`
   |
   = help: the trait `Add<()>` is not implemented for `{integer}`
   = help: the following other types implement trait `Add<Rhs>`:
             `&usize` implements `Add<usize>`
             `&usize` implements `Add`
             `&u8` implements `Add<u8>`
             `&u8` implements `Add`
             `&u16` implements `Add<u16>`
             `&u16` implements `Add`
             `&u32` implements `Add<u32>`
             `&u32` implements `Add`

error: aborting due to 2 previous errors

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


---- [ui] tests/ui/issues/issue-24352.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-24352/issue-24352.stderr"
diff of stderr:

8    = help: the following other types implement trait `Sub<Rhs>`:
9              `&f64` implements `Sub<f64>`
10              `&f64` implements `Sub`
-              `f64` implements `Sub<&f64>`
12              `f64` implements `Sub`
+              `f64` implements `Sub<&f64>`
13 help: consider using a floating-point literal by writing it with `.0`
15 LL |     1.0f64 - 1.0


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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/issues/issue-24352.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-24352" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: cannot subtract `{integer}` from `f64`
##[error]  --> /checkout/tests/ui/issues/issue-24352.rs:3:12
   |
   |
LL |     1.0f64 - 1 //~ ERROR E0277
   |            ^ no implementation for `f64 - {integer}`
   = help: the trait `Sub<{integer}>` is not implemented for `f64`
   = help: the trait `Sub<{integer}>` is not implemented for `f64`
   = help: the following other types implement trait `Sub<Rhs>`:
             `&f64` implements `Sub<f64>`
             `&f64` implements `Sub`
             `f64` implements `Sub`
             `f64` implements `Sub<&f64>`
help: consider using a floating-point literal by writing it with `.0`
   |
LL |     1.0f64 - 1.0 //~ ERROR E0277

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
---
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-50582/issue-50582.stderr"
diff of stderr:

6    |
7    = help: the trait `Add<()>` is not implemented for `{integer}`
8    = help: the following other types implement trait `Add<Rhs>`:
-              `&f128` implements `Add<f128>`
-              `&f128` implements `Add`
-              `&f16` implements `Add<f16>`
-              `&f16` implements `Add`
-              `&f32` implements `Add<f32>`
-              `&f32` implements `Add`
-              `&f64` implements `Add<f64>`
-              `&f64` implements `Add`
+              `&usize` implements `Add<usize>`
+              `&usize` implements `Add`
+              `&u8` implements `Add<u8>`
+              `&u8` implements `Add`
+              `&u16` implements `Add<u16>`
+              `&u16` implements `Add`
+              `&u32` implements `Add<u32>`
+              `&u32` implements `Add`
18 
19 error: aborting due to 1 previous error



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/issues/issue-50582.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-50582" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: cannot add `()` to `{integer}`
##[error]  --> /checkout/tests/ui/issues/issue-50582.rs:2:18
   |
   |
LL |     Vec::<[(); 1 + for x in 0..1 {}]>::new();
   |                  ^ no implementation for `{integer} + ()`
   |
   = help: the trait `Add<()>` is not implemented for `{integer}`
   = help: the following other types implement trait `Add<Rhs>`:
             `&usize` implements `Add<usize>`
             `&usize` implements `Add`
             `&u8` implements `Add<u8>`
             `&u8` implements `Add`
             `&u16` implements `Add<u16>`
             `&u16` implements `Add`
             `&u32` implements `Add<u32>`
             `&u32` implements `Add`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
---
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/iterators/invalid-iterator-chain-with-int-infer/invalid-iterator-chain-with-int-infer.stderr"
diff of stderr:

8    |
9    = help: the trait `Sum<{integer}>` is not implemented for `f32`
10    = help: the following other types implement trait `Sum<A>`:
-              `f32` implements `Sum<&f32>`
12              `f32` implements `Sum`
+              `f32` implements `Sum<&f32>`
14   --> $DIR/invalid-iterator-chain-with-int-infer.rs:2:29
15    |



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args iterators/invalid-iterator-chain-with-int-infer.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/iterators/invalid-iterator-chain-with-int-infer.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/iterators/invalid-iterator-chain-with-int-infer" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: a value of type `f32` cannot be made by summing an iterator over elements of type `{integer}`
   |
   |
LL |     let x = Some(()).iter().map(|()| 1).sum::<f32>();
   |                                         ---   ^^^ value of type `f32` cannot be made by summing a `std::iter::Iterator<Item={integer}>`
   |                                         required by a bound introduced by this call
   |
   = help: the trait `Sum<{integer}>` is not implemented for `f32`
   = help: the trait `Sum<{integer}>` is not implemented for `f32`
   = help: the following other types implement trait `Sum<A>`:
             `f32` implements `Sum`
             `f32` implements `Sum<&f32>`
  --> /checkout/tests/ui/iterators/invalid-iterator-chain-with-int-infer.rs:2:29
   |
   |
LL |     let x = Some(()).iter().map(|()| 1).sum::<f32>();
   |             -------- ------ ^^^^^^^^^^^ `Iterator::Item` changed to `{integer}` here
   |             |        |
   |             |        `Iterator::Item` is `&()` here
   |             this expression has type `Option<()>`
note: required by a bound in `std::iter::Iterator::sum`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
---
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/iterators/invalid-iterator-chain-fixable/invalid-iterator-chain-fixable.stderr"
diff of stderr:

33    |
34    = help: the trait `Sum<()>` is not implemented for `i32`
35    = help: the following other types implement trait `Sum<A>`:
-              `i32` implements `Sum<&i32>`
37              `i32` implements `Sum`
+              `i32` implements `Sum<&i32>`
39   --> $DIR/invalid-iterator-chain-fixable.rs:14:10
40    |

66    |
66    |
67    = help: the trait `Sum<()>` is not implemented for `i32`
68    = help: the following other types implement trait `Sum<A>`:
-              `i32` implements `Sum<&i32>`
70              `i32` implements `Sum`
+              `i32` implements `Sum<&i32>`
72   --> $DIR/invalid-iterator-chain-fixable.rs:23:14
73    |

99    |
99    |
100    = help: the trait `Sum<()>` is not implemented for `i32`
101    = help: the following other types implement trait `Sum<A>`:
-              `i32` implements `Sum<&i32>`
103              `i32` implements `Sum`
+              `i32` implements `Sum<&i32>`
105   --> $DIR/invalid-iterator-chain-fixable.rs:27:38
106    |



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args iterators/invalid-iterator-chain-fixable.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/iterators/invalid-iterator-chain-fixable.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/iterators/invalid-iterator-chain-fixable" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: a value of type `Vec<X>` cannot be built from an iterator over elements of type `&X`
   |
LL |     let i = i.map(|x| x.clone());
LL |     let i = i.map(|x| x.clone());
   |                         ------- this method call is cloning the reference `&X`, not `X` which doesn't implement `Clone`
LL |     i.collect() //~ ERROR E0277
   |       ^^^^^^^ value of type `Vec<X>` cannot be built from `std::iter::Iterator<Item=&X>`
   |
   = help: the trait `FromIterator<&_>` is not implemented for `Vec<X>`
           but trait `FromIterator<_>` is implemented for it
   = help: for that trait implementation, expected `X`, found `&X`
  --> /checkout/tests/ui/iterators/invalid-iterator-chain-fixable.rs:5:26
   |
   |
LL | fn iter_to_vec<'b, X>(i: Iter<'b, X>) -> Vec<X> {
   |                          ^^^^^^^^^^^ `Iterator::Item` is `&X` here
LL |     let i = i.map(|x| x.clone());
   |               ------------------ `Iterator::Item` remains `&X` here
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:1967:5
help: consider further restricting type parameter `X`
   |
   |
LL | fn iter_to_vec<'b, X>(i: Iter<'b, X>) -> Vec<X> where X: Clone {


error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
   |
   |
LL |     println!("{}", scores.sum::<i32>()); //~ ERROR E0277
   |                           ---   ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=()>`
   |                           required by a bound introduced by this call
   |
   = help: the trait `Sum<()>` is not implemented for `i32`
   = help: the trait `Sum<()>` is not implemented for `i32`
   = help: the following other types implement trait `Sum<A>`:
             `i32` implements `Sum`
             `i32` implements `Sum<&i32>`
  --> /checkout/tests/ui/iterators/invalid-iterator-chain-fixable.rs:14:10
   |
   |
LL |       let v = vec![(0, 0)];
   |               ------------ this expression has type `Vec<({integer}, {integer})>`
LL |       let scores = v
LL |           .iter()
   |            ------ `Iterator::Item` is `&({integer}, {integer})` here
LL |           .map(|(a, b)| {
LL | |             a + b;
LL | |         });
LL | |         });
   | |__________^ `Iterator::Item` changed to `()` here
note: required by a bound in `std::iter::Iterator::sum`
help: consider removing this semicolon
   |
LL -             a + b;
LL +             a + b
LL +             a + b
   |

error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
   |
   |
LL |             .sum::<i32>(), //~ ERROR E0277
   |              ---   ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=()>`
   |              required by a bound introduced by this call
   |
   = help: the trait `Sum<()>` is not implemented for `i32`
   = help: the trait `Sum<()>` is not implemented for `i32`
   = help: the following other types implement trait `Sum<A>`:
             `i32` implements `Sum`
             `i32` implements `Sum<&i32>`
  --> /checkout/tests/ui/iterators/invalid-iterator-chain-fixable.rs:23:14
   |
LL |         vec![0, 1]
   |         ---------- this expression has type `Vec<{integer}>`
   |         ---------- this expression has type `Vec<{integer}>`
LL |             .iter()
   |              ------ `Iterator::Item` is `&{integer}` here
LL |             .map(|x| x * 2)
   |              -------------- `Iterator::Item` changed to `{integer}` here
LL |             .map(|x| { x; })
   |              ^^^^^^^^^^^^^^^ `Iterator::Item` changed to `()` here
LL |             .map(|x| { x })
   |              -------------- `Iterator::Item` remains `()` here
note: required by a bound in `std::iter::Iterator::sum`
help: consider removing this semicolon
   |
   |
LL -             .map(|x| { x; })
LL +             .map(|x| { x })


error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
   |
   |
LL |     println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>()); //~ ERROR E0277
   |                                                      ---   ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=()>`
   |                                                      required by a bound introduced by this call
   |
   = help: the trait `Sum<()>` is not implemented for `i32`
   = help: the trait `Sum<()>` is not implemented for `i32`
   = help: the following other types implement trait `Sum<A>`:
             `i32` implements `Sum`
             `i32` implements `Sum<&i32>`
  --> /checkout/tests/ui/iterators/invalid-iterator-chain-fixable.rs:27:38
   |
   |
LL |     println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>()); //~ ERROR E0277
   |                    ---------- ------ ^^^^^^^^^^^^^^^ `Iterator::Item` changed to `()` here
   |                    |          |
   |                    |          `Iterator::Item` is `&{integer}` here
   |                    this expression has type `Vec<{integer}>`
note: required by a bound in `std::iter::Iterator::sum`
help: consider removing this semicolon
   |
   |
LL -     println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>()); //~ ERROR E0277
LL +     println!("{}", vec![0, 1].iter().map(|x| { x }).sum::<i32>()); //~ ERROR E0277


error[E0277]: a value of type `Vec<i32>` cannot be built from an iterator over elements of type `()`
   |
   |
LL |     let g: Vec<i32> = f.collect(); //~ ERROR E0277
   |                         ^^^^^^^ value of type `Vec<i32>` cannot be built from `std::iter::Iterator<Item=()>`
   = help: the trait `FromIterator<()>` is not implemented for `Vec<i32>`
           but trait `FromIterator<i32>` is implemented for it
   = help: for that trait implementation, expected `i32`, found `()`
note: the method call chain might not have had the expected associated types
note: the method call chain might not have had the expected associated types
  --> /checkout/tests/ui/iterators/invalid-iterator-chain-fixable.rs:32:15
   |
LL |       let a = vec![0];
   |               ------- this expression has type `Vec<{integer}>`
LL |       let b = a.into_iter();
   |                 ----------- `Iterator::Item` is `{integer}` here
LL |       let c = b.map(|x| x + 1);
   |                 -------------- `Iterator::Item` remains `{integer}` here
LL |       let d = c.filter(|x| *x > 10 );
   |                 -------------------- `Iterator::Item` remains `{integer}` here
LL |       let e = d.map(|x| {
LL | |         x + 1;
LL | |     });
LL | |     });
   | |______^ `Iterator::Item` changed to `()` here
LL |       let f = e.filter(|_| false);
   |                 ----------------- `Iterator::Item` remains `()` here
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:1967:5
help: consider removing this semicolon
   |
LL -         x + 1;
---
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/iterators/invalid-iterator-chain/invalid-iterator-chain.stderr"
diff of stderr:

33    |
34    = help: the trait `Sum<()>` is not implemented for `i32`
35    = help: the following other types implement trait `Sum<A>`:
-              `i32` implements `Sum<&i32>`
37              `i32` implements `Sum`
+              `i32` implements `Sum<&i32>`
39   --> $DIR/invalid-iterator-chain.rs:12:10
40    |

65    |
65    |
66    = help: the trait `Sum<()>` is not implemented for `i32`
67    = help: the following other types implement trait `Sum<A>`:
-              `i32` implements `Sum<&i32>`
69              `i32` implements `Sum`
+              `i32` implements `Sum<&i32>`
71   --> $DIR/invalid-iterator-chain.rs:25:14
72    |

104    |
104    |
105    = help: the trait `Sum<f64>` is not implemented for `i32`
106    = help: the following other types implement trait `Sum<A>`:
-              `i32` implements `Sum<&i32>`
108              `i32` implements `Sum`
+              `i32` implements `Sum<&i32>`
110   --> $DIR/invalid-iterator-chain.rs:33:14
111    |

134    |
134    |
135    = help: the trait `Sum<()>` is not implemented for `i32`
136    = help: the following other types implement trait `Sum<A>`:
-              `i32` implements `Sum<&i32>`
138              `i32` implements `Sum`
+              `i32` implements `Sum<&i32>`
140   --> $DIR/invalid-iterator-chain.rs:38:38
141    |

162    |
162    |
163    = help: the trait `Sum<&()>` is not implemented for `i32`
164    = help: the following other types implement trait `Sum<A>`:
-              `i32` implements `Sum<&i32>`
166              `i32` implements `Sum`
+              `i32` implements `Sum<&i32>`
168   --> $DIR/invalid-iterator-chain.rs:39:33
169    |



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/iterators/invalid-iterator-chain.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/iterators/invalid-iterator-chain" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: a value of type `Vec<X>` cannot be built from an iterator over elements of type `&X`
   |
LL |     let i = i.map(|x| x.clone());
LL |     let i = i.map(|x| x.clone());
   |                         ------- this method call is cloning the reference `&X`, not `X` which doesn't implement `Clone`
LL |     i.collect() //~ ERROR E0277
   |       ^^^^^^^ value of type `Vec<X>` cannot be built from `std::iter::Iterator<Item=&X>`
   |
   = help: the trait `FromIterator<&_>` is not implemented for `Vec<X>`
           but trait `FromIterator<_>` is implemented for it
   = help: for that trait implementation, expected `X`, found `&X`
  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:4:26
   |
   |
LL | fn iter_to_vec<'b, X>(i: Iter<'b, X>) -> Vec<X> {
   |                          ^^^^^^^^^^^ `Iterator::Item` is `&X` here
LL |     let i = i.map(|x| x.clone());
   |               ------------------ `Iterator::Item` remains `&X` here
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:1967:5
help: consider further restricting type parameter `X`
   |
   |
LL | fn iter_to_vec<'b, X>(i: Iter<'b, X>) -> Vec<X> where X: Clone {


error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
   |
   |
LL |     println!("{}", scores.sum::<i32>()); //~ ERROR E0277
   |                           ---   ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=()>`
   |                           required by a bound introduced by this call
   |
   = help: the trait `Sum<()>` is not implemented for `i32`
   = help: the trait `Sum<()>` is not implemented for `i32`
   = help: the following other types implement trait `Sum<A>`:
             `i32` implements `Sum`
             `i32` implements `Sum<&i32>`
  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:12:10
   |
   |
LL |       let scores = vec![(0, 0)]
   |                    ------------ this expression has type `Vec<({integer}, {integer})>`
LL |           .iter()
   |            ------ `Iterator::Item` is `&({integer}, {integer})` here
LL |           .map(|(a, b)| {
LL | |             a + b;
LL | |         });
LL | |         });
   | |__________^ `Iterator::Item` changed to `()` here
note: required by a bound in `std::iter::Iterator::sum`
help: consider removing this semicolon
   |
LL -             a + b;
LL +             a + b
LL +             a + b
   |

error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
   |
   |
LL |             .sum::<i32>(), //~ ERROR E0277
   |              ---   ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=()>`
   |              required by a bound introduced by this call
   |
   = help: the trait `Sum<()>` is not implemented for `i32`
   = help: the trait `Sum<()>` is not implemented for `i32`
   = help: the following other types implement trait `Sum<A>`:
             `i32` implements `Sum`
             `i32` implements `Sum<&i32>`
  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:25:14
   |
LL |         vec![0, 1]
   |         ---------- this expression has type `Vec<{integer}>`
   |         ---------- this expression has type `Vec<{integer}>`
LL |             .iter()
   |              ------ `Iterator::Item` is `&{integer}` here
LL |             .map(|x| x * 2)
   |              -------------- `Iterator::Item` changed to `{integer}` here
LL |             .map(|x| x as f64)
   |              ----------------- `Iterator::Item` changed to `f64` here
LL |             .map(|x| x as i64)
   |              ----------------- `Iterator::Item` changed to `i64` here
LL |             .filter(|x| *x > 0)
   |              ------------------ `Iterator::Item` remains `i64` here
LL |             .map(|x| { x + 1 })
   |              ------------------ `Iterator::Item` remains `i64` here
LL |             .map(|x| { x; })
   |              ^^^^^^^^^^^^^^^ `Iterator::Item` changed to `()` here
note: required by a bound in `std::iter::Iterator::sum`
help: consider removing this semicolon
   |
   |
LL -             .map(|x| { x; })
LL +             .map(|x| { x })


error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `f64`
   |
   |
LL |             .sum::<i32>(), //~ ERROR E0277
   |              ---   ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=f64>`
   |              required by a bound introduced by this call
   |
   |
   = help: the trait `Sum<f64>` is not implemented for `i32`
   = help: the following other types implement trait `Sum<A>`:
             `i32` implements `Sum`
             `i32` implements `Sum<&i32>`
  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:33:14
   |
LL |         vec![0, 1]
   |         ---------- this expression has type `Vec<{integer}>`
   |         ---------- this expression has type `Vec<{integer}>`
LL |             .iter()
   |              ------ `Iterator::Item` is `&{integer}` here
LL |             .map(|x| x * 2)
   |              -------------- `Iterator::Item` changed to `{integer}` here
LL |             .map(|x| x as f64)
   |              ^^^^^^^^^^^^^^^^^ `Iterator::Item` changed to `f64` here
LL |             .filter(|x| *x > 0.0)
   |              -------------------- `Iterator::Item` remains `f64` here
LL |             .map(|x| { x + 1.0 })
   |              -------------------- `Iterator::Item` remains `f64` here
note: required by a bound in `std::iter::Iterator::sum`


error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
   |
   |
LL |     println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>()); //~ ERROR E0277
   |                                                      ---   ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=()>`
   |                                                      required by a bound introduced by this call
   |
   = help: the trait `Sum<()>` is not implemented for `i32`
   = help: the trait `Sum<()>` is not implemented for `i32`
   = help: the following other types implement trait `Sum<A>`:
             `i32` implements `Sum`
             `i32` implements `Sum<&i32>`
  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:38:38
   |
   |
LL |     println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>()); //~ ERROR E0277
   |                    ---------- ------ ^^^^^^^^^^^^^^^ `Iterator::Item` changed to `()` here
   |                    |          |
   |                    |          `Iterator::Item` is `&{integer}` here
   |                    this expression has type `Vec<{integer}>`
note: required by a bound in `std::iter::Iterator::sum`
help: consider removing this semicolon
   |
   |
LL -     println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>()); //~ ERROR E0277
LL +     println!("{}", vec![0, 1].iter().map(|x| { x }).sum::<i32>()); //~ ERROR E0277


error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `&()`
   |
   |
LL |     println!("{}", vec![(), ()].iter().sum::<i32>()); //~ ERROR E0277
   |                                        ---   ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=&()>`
   |                                        required by a bound introduced by this call
   |
   |
   = help: the trait `Sum<&()>` is not implemented for `i32`
   = help: the following other types implement trait `Sum<A>`:
             `i32` implements `Sum`
             `i32` implements `Sum<&i32>`
  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:39:33
   |
   |
LL |     println!("{}", vec![(), ()].iter().sum::<i32>()); //~ ERROR E0277
   |                    ------------ ^^^^^^ `Iterator::Item` is `&()` here
   |                    this expression has type `Vec<()>`
note: required by a bound in `std::iter::Iterator::sum`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:3521:5


error[E0277]: a value of type `Vec<i32>` cannot be built from an iterator over elements of type `()`
   |
   |
LL |     let g: Vec<i32> = f.collect(); //~ ERROR E0277
   |                         ^^^^^^^ value of type `Vec<i32>` cannot be built from `std::iter::Iterator<Item=()>`
   = help: the trait `FromIterator<()>` is not implemented for `Vec<i32>`
           but trait `FromIterator<i32>` is implemented for it
   = help: for that trait implementation, expected `i32`, found `()`
note: the method call chain might not have had the expected associated types
note: the method call chain might not have had the expected associated types
  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:44:15
   |
LL |       let a = vec![0];
   |               ------- this expression has type `Vec<{integer}>`
LL |       let b = a.into_iter();
   |                 ----------- `Iterator::Item` is `{integer}` here
LL |       let c = b.map(|x| x + 1);
   |                 -------------- `Iterator::Item` remains `{integer}` here
LL |       let d = c.filter(|x| *x > 10 );
   |                 -------------------- `Iterator::Item` remains `{integer}` here
LL |       let e = d.map(|x| {
LL | |         x + 1;
LL | |     });
LL | |     });
   | |______^ `Iterator::Item` changed to `()` here
LL |       let f = e.filter(|_| false);
   |                 ----------------- `Iterator::Item` remains `()` here
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:1967:5
help: consider removing this semicolon
   |
LL -         x + 1;
---
diff of stderr:

5    |                  ^^ the trait `From<()>` is not implemented for `String`
6    |
7    = help: the following other types implement trait `From<T>`:
-              `String` implements `From<&String>`
-              `String` implements `From<&mut str>`
10              `String` implements `From<&str>`
+              `String` implements `From<&mut str>`
+              `String` implements `From<&String>`
11              `String` implements `From<Box<str>>`
12              `String` implements `From<Cow<'_, str>>`
13              `String` implements `From<char>`

The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args lazy-type-alias/trailing-where-clause.rs`
To only update this specific test, also pass `--test-args lazy-type-alias/trailing-where-clause.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/lazy-type-alias/trailing-where-clause.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lazy-type-alias/trailing-where-clause" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: the trait bound `String: From<()>` is not satisfied
##[error]  --> /checkout/tests/ui/lazy-type-alias/trailing-where-clause.rs:12:18
   |
   |
LL |     let _: Alias<()>; //~ ERROR the trait bound `String: From<()>` is not satisfied
   |                  ^^ the trait `From<()>` is not implemented for `String`
   = help: the following other types implement trait `From<T>`:
             `String` implements `From<&str>`
             `String` implements `From<&mut str>`
             `String` implements `From<&String>`
             `String` implements `From<&String>`
             `String` implements `From<Box<str>>`
             `String` implements `From<Cow<'_, str>>`
             `String` implements `From<char>`
note: required by a bound in `Alias`
   |
LL | type Alias<T> = T
   |      ----- required by a bound in this type alias
LL | where
---
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/mismatched_types/binops/binops.stderr"
diff of stderr:

6    |
7    = help: the trait `Add<Option<{integer}>>` is not implemented for `{integer}`
8    = help: the following other types implement trait `Add<Rhs>`:
-              `&f128` implements `Add<f128>`
-              `&f128` implements `Add`
-              `&f16` implements `Add<f16>`
-              `&f16` implements `Add`
-              `&f32` implements `Add<f32>`
-              `&f32` implements `Add`
-              `&f64` implements `Add<f64>`
-              `&f64` implements `Add`
+              `&usize` implements `Add<usize>`
+              `&usize` implements `Add`
+              `&u8` implements `Add<u8>`
+              `&u8` implements `Add`
+              `&u16` implements `Add<u16>`
+              `&u16` implements `Add`
+              `&u32` implements `Add<u32>`
+              `&u32` implements `Add`
18 
18 
19 error[E0277]: cannot subtract `Option<{integer}>` from `usize`

26    = help: the following other types implement trait `Sub<Rhs>`:
27              `&usize` implements `Sub<usize>`
28              `&usize` implements `Sub`
-              `usize` implements `Sub<&usize>`
30              `usize` implements `Sub`
+              `usize` implements `Sub<&usize>`
31 
32 error[E0277]: cannot multiply `{integer}` by `()`

37    |
38    = help: the trait `Mul<()>` is not implemented for `{integer}`
38    = help: the trait `Mul<()>` is not implemented for `{integer}`
39    = help: the following other types implement trait `Mul<Rhs>`:
-              `&f128` implements `Mul<f128>`
-              `&f128` implements `Mul`
-              `&f16` implements `Mul<f16>`
-              `&f16` implements `Mul`
-              `&f32` implements `Mul<f32>`
-              `&f32` implements `Mul`
-              `&f64` implements `Mul<f64>`
-              `&f64` implements `Mul`
+              `&usize` implements `Mul<usize>`
+              `&usize` implements `Mul`
+              `&u8` implements `Mul<u8>`
+              `&u8` implements `Mul`
+              `&u16` implements `Mul<u16>`
+              `&u16` implements `Mul`
+              `&u32` implements `Mul<u32>`
+              `&u32` implements `Mul`
49 
49 
50 error[E0277]: cannot divide `{integer}` by `&str`
55    |
55    |
56    = help: the trait `Div<&str>` is not implemented for `{integer}`
57    = help: the following other types implement trait `Div<Rhs>`:
-              `&f128` implements `Div<f128>`
-              `&f128` implements `Div`
-              `&f16` implements `Div<f16>`
-              `&f16` implements `Div`
-              `&f32` implements `Div<f32>`
-              `&f32` implements `Div`
-              `&f64` implements `Div<f64>`
-              `&f64` implements `Div`
+              `u8` implements `Div<NonZero<u8>>`
+              `u8` implements `Div`
+              `u8` implements `Div<&u8>`
+              `u16` implements `Div<NonZero<u16>>`
+              `u16` implements `Div`
+              `u16` implements `Div<&u16>`
+              `u32` implements `Div<NonZero<u32>>`
+              `u32` implements `Div`
67 
68 error[E0277]: can't compare `{integer}` with `String`

73    |
73    |
74    = help: the trait `PartialOrd<String>` is not implemented for `{integer}`
75    = help: the following other types implement trait `PartialOrd<Rhs>`:
77              f16
78              f32
79              f64

---
+              u16
+              u32
84            and 8 others
85 
86 error[E0277]: can't compare `{integer}` with `Result<{integer}, _>`
91    |
91    |
92    = help: the trait `PartialEq<Result<{integer}, _>>` is not implemented for `{integer}`
93    = help: the following other types implement trait `PartialEq<Rhs>`:
-              f16
-              f32
-              f64
-              i128
---
To only update this specific test, also pass `--test-args mismatched_types/binops.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/mismatched_types/binops.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/mismatched_types/binops" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: cannot add `Option<{integer}>` to `{integer}`
   |
   |
LL |     1 + Some(1); //~ ERROR cannot add `Option<{integer}>` to `{integer}`
   |       ^ no implementation for `{integer} + Option<{integer}>`
   |
   = help: the trait `Add<Option<{integer}>>` is not implemented for `{integer}`
   = help: the following other types implement trait `Add<Rhs>`:
             `&usize` implements `Add<usize>`
             `&usize` implements `Add`
             `&u8` implements `Add<u8>`
             `&u8` implements `Add`
             `&u16` implements `Add<u16>`
             `&u16` implements `Add`
             `&u32` implements `Add<u32>`
             `&u32` implements `Add`


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

error[E0277]: cannot multiply `{integer}` by `()`
   |
   |
LL |     3 * (); //~ ERROR cannot multiply `{integer}` by `()`
   |       ^ no implementation for `{integer} * ()`
   = help: the trait `Mul<()>` is not implemented for `{integer}`
   = help: the trait `Mul<()>` is not implemented for `{integer}`
   = help: the following other types implement trait `Mul<Rhs>`:
             `&usize` implements `Mul<usize>`
             `&usize` implements `Mul`
             `&u8` implements `Mul<u8>`
             `&u8` implements `Mul`
             `&u16` implements `Mul<u16>`
             `&u16` implements `Mul`
             `&u32` implements `Mul<u32>`
             `&u32` implements `Mul`


error[E0277]: cannot divide `{integer}` by `&str`
   |
   |
LL |     4 / ""; //~ ERROR cannot divide `{integer}` by `&str`
   |       ^ no implementation for `{integer} / &str`
   |
   = help: the trait `Div<&str>` is not implemented for `{integer}`
   = help: the following other types implement trait `Div<Rhs>`:
             `u8` implements `Div<NonZero<u8>>`
             `u8` implements `Div`
             `u8` implements `Div<&u8>`
             `u16` implements `Div<NonZero<u16>>`
             `u16` implements `Div`
             `u16` implements `Div<&u16>`
             `u32` implements `Div<NonZero<u32>>`
             `u32` implements `Div`

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

error[E0277]: can't compare `{integer}` with `Result<{integer}, _>`
   |
   |
LL |     6 == Ok(1); //~ ERROR can't compare `{integer}` with `Result<{integer}, _>`
   |       ^^ no implementation for `{integer} == Result<{integer}, _>`
   |
   = help: the trait `PartialEq<Result<{integer}, _>>` is not implemented for `{integer}`
   = help: the following other types implement trait `PartialEq<Rhs>`:
             u8
             u16
             u32
             u64
---
---- [ui] tests/ui/never_type/issue-13352.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/issue-13352/issue-13352.stderr"
diff of stderr:

8    = help: the following other types implement trait `Add<Rhs>`:
9              `&usize` implements `Add<usize>`
10              `&usize` implements `Add`
-              `usize` implements `Add<&usize>`
12              `usize` implements `Add`
+              `usize` implements `Add<&usize>`
14 error: aborting due to 1 previous error
15 



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/issue-13352.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/issue-13352" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: cannot add `()` to `usize`
##[error]  --> /checkout/tests/ui/never_type/issue-13352.rs:7:13
   |
   |
LL |     2_usize + (loop {});
   |             ^ no implementation for `usize + ()`
   |
   = help: the trait `Add<()>` is not implemented for `usize`
   = help: the following other types implement trait `Add<Rhs>`:
             `&usize` implements `Add<usize>`
             `&usize` implements `Add`
             `usize` implements `Add`
             `usize` implements `Add<&usize>`
error: aborting due to 1 previous error

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


---- [ui] tests/ui/numbers-arithmetic/not-suggest-float-literal.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/numbers-arithmetic/not-suggest-float-literal/not-suggest-float-literal.stderr"
diff of stderr:

8    = help: the following other types implement trait `Add<Rhs>`:
9              `&u8` implements `Add<u8>`
10              `&u8` implements `Add`
-              `u8` implements `Add<&u8>`
12              `u8` implements `Add`
+              `u8` implements `Add<&u8>`
14 error[E0277]: cannot add `&str` to `f64`
15   --> $DIR/not-suggest-float-literal.rs:6:7


21    = help: the following other types implement trait `Add<Rhs>`:
22              `&f64` implements `Add<f64>`
23              `&f64` implements `Add`
-              `f64` implements `Add<&f64>`
25              `f64` implements `Add`
+              `f64` implements `Add<&f64>`
27 error[E0277]: cannot add `{integer}` to `f64`
28   --> $DIR/not-suggest-float-literal.rs:11:7


34    = help: the following other types implement trait `Add<Rhs>`:
35              `&f64` implements `Add<f64>`
36              `&f64` implements `Add`
-              `f64` implements `Add<&f64>`
38              `f64` implements `Add`
+              `f64` implements `Add<&f64>`
39 
40 error[E0277]: cannot subtract `{float}` from `u8`


47    = help: the following other types implement trait `Sub<Rhs>`:
48              `&u8` implements `Sub<u8>`
49              `&u8` implements `Sub`
-              `u8` implements `Sub<&u8>`
51              `u8` implements `Sub`
+              `u8` implements `Sub<&u8>`
53 error[E0277]: cannot subtract `&str` from `f64`
54   --> $DIR/not-suggest-float-literal.rs:19:7


60    = help: the following other types implement trait `Sub<Rhs>`:
61              `&f64` implements `Sub<f64>`
62              `&f64` implements `Sub`
-              `f64` implements `Sub<&f64>`
64              `f64` implements `Sub`
+              `f64` implements `Sub<&f64>`
66 error[E0277]: cannot subtract `{integer}` from `f64`
67   --> $DIR/not-suggest-float-literal.rs:24:7


73    = help: the following other types implement trait `Sub<Rhs>`:
74              `&f64` implements `Sub<f64>`
75              `&f64` implements `Sub`
-              `f64` implements `Sub<&f64>`
77              `f64` implements `Sub`
+              `f64` implements `Sub<&f64>`
79 error[E0277]: cannot multiply `u8` by `{float}`
80   --> $DIR/not-suggest-float-literal.rs:28:7


86    = help: the following other types implement trait `Mul<Rhs>`:
87              `&u8` implements `Mul<u8>`
88              `&u8` implements `Mul`
-              `u8` implements `Mul<&u8>`
90              `u8` implements `Mul`
+              `u8` implements `Mul<&u8>`
91 
92 error[E0277]: cannot multiply `f64` by `&str`


99    = help: the following other types implement trait `Mul<Rhs>`:
100              `&f64` implements `Mul<f64>`
101              `&f64` implements `Mul`
-              `f64` implements `Mul<&f64>`
103              `f64` implements `Mul`
+              `f64` implements `Mul<&f64>`
105 error[E0277]: cannot multiply `f64` by `{integer}`
106   --> $DIR/not-suggest-float-literal.rs:37:7


112    = help: the following other types implement trait `Mul<Rhs>`:
113              `&f64` implements `Mul<f64>`
114              `&f64` implements `Mul`
-              `f64` implements `Mul<&f64>`
116              `f64` implements `Mul`
+              `f64` implements `Mul<&f64>`
118 error[E0277]: cannot divide `u8` by `{float}`
119   --> $DIR/not-suggest-float-literal.rs:41:7

123    |
123    |
124    = help: the trait `Div<{float}>` is not implemented for `u8`
125    = help: the following other types implement trait `Div<Rhs>`:
-              `&u8` implements `Div<u8>`
-              `&u8` implements `Div`
-              `u8` implements `Div<&u8>`
129              `u8` implements `Div<NonZero<u8>>`
130              `u8` implements `Div`
+              `u8` implements `Div<&u8>`
+              `&u8` implements `Div<u8>`
+              `&u8` implements `Div`
132 error[E0277]: cannot divide `f64` by `&str`
133   --> $DIR/not-suggest-float-literal.rs:45:7


139    = help: the following other types implement trait `Div<Rhs>`:
140              `&f64` implements `Div<f64>`
141              `&f64` implements `Div`
-              `f64` implements `Div<&f64>`
143              `f64` implements `Div`
+              `f64` implements `Div<&f64>`
145 error[E0277]: cannot divide `f64` by `{integer}`
146   --> $DIR/not-suggest-float-literal.rs:50:7


152    = help: the following other types implement trait `Div<Rhs>`:
153              `&f64` implements `Div<f64>`
154              `&f64` implements `Div`
-              `f64` implements `Div<&f64>`
156              `f64` implements `Div`
+              `f64` implements `Div<&f64>`
158 error: aborting due to 12 previous errors
159 



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args numbers-arithmetic/not-suggest-float-literal.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/numbers-arithmetic/not-suggest-float-literal" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: cannot add `{float}` to `u8`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs:2:7
   |
   |
LL |     x + 100.0 //~ ERROR cannot add `{float}` to `u8`
   |       ^ no implementation for `u8 + {float}`
   = help: the trait `Add<{float}>` is not implemented for `u8`
   = help: the trait `Add<{float}>` is not implemented for `u8`
   = help: the following other types implement trait `Add<Rhs>`:
             `&u8` implements `Add<u8>`
             `&u8` implements `Add`
             `u8` implements `Add`
             `u8` implements `Add<&u8>`
error[E0277]: cannot add `&str` to `f64`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs:6:7
   |
   |
LL |     x + "foo" //~ ERROR cannot add `&str` to `f64`
   |       ^ no implementation for `f64 + &str`
   = help: the trait `Add<&str>` is not implemented for `f64`
   = help: the trait `Add<&str>` is not implemented for `f64`
   = help: the following other types implement trait `Add<Rhs>`:
             `&f64` implements `Add<f64>`
             `&f64` implements `Add`
             `f64` implements `Add`
             `f64` implements `Add<&f64>`
error[E0277]: cannot add `{integer}` to `f64`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs:11:7
   |
   |
LL |     x + y //~ ERROR cannot add `{integer}` to `f64`
   |       ^ no implementation for `f64 + {integer}`
   = help: the trait `Add<{integer}>` is not implemented for `f64`
   = help: the trait `Add<{integer}>` is not implemented for `f64`
   = help: the following other types implement trait `Add<Rhs>`:
             `&f64` implements `Add<f64>`
             `&f64` implements `Add`
             `f64` implements `Add`
             `f64` implements `Add<&f64>`

error[E0277]: cannot subtract `{float}` from `u8`
   |
   |
LL |     x - 100.0 //~ ERROR cannot subtract `{float}` from `u8`
   |       ^ no implementation for `u8 - {float}`
   = help: the trait `Sub<{float}>` is not implemented for `u8`
   = help: the trait `Sub<{float}>` is not implemented for `u8`
   = help: the following other types implement trait `Sub<Rhs>`:
             `&u8` implements `Sub<u8>`
             `&u8` implements `Sub`
             `u8` implements `Sub`
             `u8` implements `Sub<&u8>`
error[E0277]: cannot subtract `&str` from `f64`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs:19:7
   |
   |
LL |     x - "foo" //~ ERROR cannot subtract `&str` from `f64`
   |       ^ no implementation for `f64 - &str`
   = help: the trait `Sub<&str>` is not implemented for `f64`
   = help: the trait `Sub<&str>` is not implemented for `f64`
   = help: the following other types implement trait `Sub<Rhs>`:
             `&f64` implements `Sub<f64>`
             `&f64` implements `Sub`
             `f64` implements `Sub`
             `f64` implements `Sub<&f64>`
error[E0277]: cannot subtract `{integer}` from `f64`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs:24:7
   |
   |
LL |     x - y //~ ERROR cannot subtract `{integer}` from `f64`
   |       ^ no implementation for `f64 - {integer}`
   = help: the trait `Sub<{integer}>` is not implemented for `f64`
   = help: the trait `Sub<{integer}>` is not implemented for `f64`
   = help: the following other types implement trait `Sub<Rhs>`:
             `&f64` implements `Sub<f64>`
             `&f64` implements `Sub`
             `f64` implements `Sub`
             `f64` implements `Sub<&f64>`
error[E0277]: cannot multiply `u8` by `{float}`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs:28:7
   |
   |
LL |     x * 100.0 //~ ERROR cannot multiply `u8` by `{float}`
   |       ^ no implementation for `u8 * {float}`
   = help: the trait `Mul<{float}>` is not implemented for `u8`
   = help: the trait `Mul<{float}>` is not implemented for `u8`
   = help: the following other types implement trait `Mul<Rhs>`:
             `&u8` implements `Mul<u8>`
             `&u8` implements `Mul`
             `u8` implements `Mul`
             `u8` implements `Mul<&u8>`

error[E0277]: cannot multiply `f64` by `&str`
   |
   |
LL |     x * "foo" //~ ERROR cannot multiply `f64` by `&str`
   |       ^ no implementation for `f64 * &str`
   = help: the trait `Mul<&str>` is not implemented for `f64`
   = help: the trait `Mul<&str>` is not implemented for `f64`
   = help: the following other types implement trait `Mul<Rhs>`:
             `&f64` implements `Mul<f64>`
             `&f64` implements `Mul`
             `f64` implements `Mul`
             `f64` implements `Mul<&f64>`
error[E0277]: cannot multiply `f64` by `{integer}`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs:37:7
   |
   |
LL |     x * y //~ ERROR cannot multiply `f64` by `{integer}`
   |       ^ no implementation for `f64 * {integer}`
   = help: the trait `Mul<{integer}>` is not implemented for `f64`
   = help: the trait `Mul<{integer}>` is not implemented for `f64`
   = help: the following other types implement trait `Mul<Rhs>`:
             `&f64` implements `Mul<f64>`
             `&f64` implements `Mul`
             `f64` implements `Mul`
             `f64` implements `Mul<&f64>`
error[E0277]: cannot divide `u8` by `{float}`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs:41:7
   |
   |
LL |     x / 100.0 //~ ERROR cannot divide `u8` by `{float}`
   |       ^ no implementation for `u8 / {float}`
   = help: the trait `Div<{float}>` is not implemented for `u8`
   = help: the trait `Div<{float}>` is not implemented for `u8`
   = help: the following other types implement trait `Div<Rhs>`:
             `u8` implements `Div<NonZero<u8>>`
             `u8` implements `Div`
             `u8` implements `Div<&u8>`
             `&u8` implements `Div<u8>`
             `&u8` implements `Div`
error[E0277]: cannot divide `f64` by `&str`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs:45:7
   |
   |
LL |     x / "foo" //~ ERROR cannot divide `f64` by `&str`
   |       ^ no implementation for `f64 / &str`
   |
   = help: the trait `Div<&str>` is not implemented for `f64`
   = help: the following other types implement trait `Div<Rhs>`:
             `&f64` implements `Div<f64>`
             `&f64` implements `Div`
             `f64` implements `Div`
             `f64` implements `Div<&f64>`
error[E0277]: cannot divide `f64` by `{integer}`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs:50:7
   |
   |
LL |     x / y //~ ERROR cannot divide `f64` by `{integer}`
   |       ^ no implementation for `f64 / {integer}`
   = help: the trait `Div<{integer}>` is not implemented for `f64`
   = help: the trait `Div<{integer}>` is not implemented for `f64`
   = help: the following other types implement trait `Div<Rhs>`:
             `&f64` implements `Div<f64>`
             `&f64` implements `Div`
             `f64` implements `Div`
             `f64` implements `Div<&f64>`
error: aborting due to 12 previous errors

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


---- [ui] tests/ui/numbers-arithmetic/suggest-float-literal.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/numbers-arithmetic/suggest-float-literal/suggest-float-literal.stderr"
diff of stderr:

8    = help: the following other types implement trait `Add<Rhs>`:
9              `&f32` implements `Add<f32>`
10              `&f32` implements `Add`
-              `f32` implements `Add<&f32>`
12              `f32` implements `Add`
+              `f32` implements `Add<&f32>`
13 help: consider using a floating-point literal by writing it with `.0`
15 LL |     x + 100.0


25    = help: the following other types implement trait `Add<Rhs>`:
26              `&f64` implements `Add<f64>`
27              `&f64` implements `Add`
-              `f64` implements `Add<&f64>`
29              `f64` implements `Add`
+              `f64` implements `Add<&f64>`
30 help: consider using a floating-point literal by writing it with `.0`
32 LL |     x + 100.0


42    = help: the following other types implement trait `Sub<Rhs>`:
43              `&f32` implements `Sub<f32>`
44              `&f32` implements `Sub`
-              `f32` implements `Sub<&f32>`
46              `f32` implements `Sub`
+              `f32` implements `Sub<&f32>`
47 help: consider using a floating-point literal by writing it with `.0`
49 LL |     x - 100.0


59    = help: the following other types implement trait `Sub<Rhs>`:
60              `&f64` implements `Sub<f64>`
61              `&f64` implements `Sub`
-              `f64` implements `Sub<&f64>`
63              `f64` implements `Sub`
+              `f64` implements `Sub<&f64>`
64 help: consider using a floating-point literal by writing it with `.0`
66 LL |     x - 100.0


76    = help: the following other types implement trait `Mul<Rhs>`:
77              `&f32` implements `Mul<f32>`
78              `&f32` implements `Mul`
-              `f32` implements `Mul<&f32>`
80              `f32` implements `Mul`
+              `f32` implements `Mul<&f32>`
81 help: consider using a floating-point literal by writing it with `.0`
83 LL |     x * 100.0


93    = help: the following other types implement trait `Mul<Rhs>`:
94              `&f64` implements `Mul<f64>`
95              `&f64` implements `Mul`
-              `f64` implements `Mul<&f64>`
97              `f64` implements `Mul`
+              `f64` implements `Mul<&f64>`
98 help: consider using a floating-point literal by writing it with `.0`
100 LL |     x * 100.0


110    = help: the following other types implement trait `Div<Rhs>`:
111              `&f32` implements `Div<f32>`
112              `&f32` implements `Div`
-              `f32` implements `Div<&f32>`
114              `f32` implements `Div`
+              `f32` implements `Div<&f32>`
115 help: consider using a floating-point literal by writing it with `.0`
117 LL |     x / 100.0


127    = help: the following other types implement trait `Div<Rhs>`:
128              `&f64` implements `Div<f64>`
129              `&f64` implements `Div`
-              `f64` implements `Div<&f64>`
131              `f64` implements `Div`
+              `f64` implements `Div<&f64>`
132 help: consider using a floating-point literal by writing it with `.0`
134 LL |     x / 100.0


The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args numbers-arithmetic/suggest-float-literal.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/numbers-arithmetic/suggest-float-literal.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/numbers-arithmetic/suggest-float-literal" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: cannot add `{integer}` to `f32`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/suggest-float-literal.rs:6:7
   |
   |
LL |     x + 100 //~ ERROR cannot add `{integer}` to `f32`
   |       ^ no implementation for `f32 + {integer}`
   = help: the trait `Add<{integer}>` is not implemented for `f32`
   = help: the trait `Add<{integer}>` is not implemented for `f32`
   = help: the following other types implement trait `Add<Rhs>`:
             `&f32` implements `Add<f32>`
             `&f32` implements `Add`
             `f32` implements `Add`
             `f32` implements `Add<&f32>`
help: consider using a floating-point literal by writing it with `.0`
   |
LL |     x + 100.0 //~ ERROR cannot add `{integer}` to `f32`

error[E0277]: cannot add `{integer}` to `f64`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/suggest-float-literal.rs:10:7
   |
   |
LL |     x + 100 //~ ERROR cannot add `{integer}` to `f64`
   |       ^ no implementation for `f64 + {integer}`
   = help: the trait `Add<{integer}>` is not implemented for `f64`
   = help: the trait `Add<{integer}>` is not implemented for `f64`
   = help: the following other types implement trait `Add<Rhs>`:
             `&f64` implements `Add<f64>`
             `&f64` implements `Add`
             `f64` implements `Add`
             `f64` implements `Add<&f64>`
help: consider using a floating-point literal by writing it with `.0`
   |
LL |     x + 100.0 //~ ERROR cannot add `{integer}` to `f64`

error[E0277]: cannot subtract `{integer}` from `f32`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/suggest-float-literal.rs:14:7
   |
   |
LL |     x - 100 //~ ERROR cannot subtract `{integer}` from `f32`
   |       ^ no implementation for `f32 - {integer}`
   = help: the trait `Sub<{integer}>` is not implemented for `f32`
   = help: the trait `Sub<{integer}>` is not implemented for `f32`
   = help: the following other types implement trait `Sub<Rhs>`:
             `&f32` implements `Sub<f32>`
             `&f32` implements `Sub`
             `f32` implements `Sub`
             `f32` implements `Sub<&f32>`
help: consider using a floating-point literal by writing it with `.0`
   |
LL |     x - 100.0 //~ ERROR cannot subtract `{integer}` from `f32`

error[E0277]: cannot subtract `{integer}` from `f64`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/suggest-float-literal.rs:18:7
   |
   |
LL |     x - 100 //~ ERROR cannot subtract `{integer}` from `f64`
   |       ^ no implementation for `f64 - {integer}`
   = help: the trait `Sub<{integer}>` is not implemented for `f64`
   = help: the trait `Sub<{integer}>` is not implemented for `f64`
   = help: the following other types implement trait `Sub<Rhs>`:
             `&f64` implements `Sub<f64>`
             `&f64` implements `Sub`
---
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/on-unimplemented/multiple-impls/multiple-impls.stderr"
diff of stderr:

8    |
9    = help: the trait `Index<u32>` is not implemented for `[i32]`
10    = help: the following other types implement trait `Index<Idx>`:
-              `[i32]` implements `Index<Bar<usize>>`
12              `[i32]` implements `Index<Foo<usize>>`
+              `[i32]` implements `Index<Bar<usize>>`
13 
14 error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied

21    |
21    |
22    = help: the trait `Index<Foo<u32>>` is not implemented for `[i32]`
23    = help: the following other types implement trait `Index<Idx>`:
-              `[i32]` implements `Index<Bar<usize>>`
25              `[i32]` implements `Index<Foo<usize>>`
+              `[i32]` implements `Index<Bar<usize>>`
26 
27 error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied

34    |
34    |
35    = help: the trait `Index<Bar<u32>>` is not implemented for `[i32]`
36    = help: the following other types implement trait `Index<Idx>`:
-              `[i32]` implements `Index<Bar<usize>>`
38              `[i32]` implements `Index<Foo<usize>>`
+              `[i32]` implements `Index<Bar<usize>>`
39 
40 error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied

45    |
45    |
46    = help: the trait `Index<u32>` is not implemented for `[i32]`
47    = help: the following other types implement trait `Index<Idx>`:
-              `[i32]` implements `Index<Bar<usize>>`
49              `[i32]` implements `Index<Foo<usize>>`
+              `[i32]` implements `Index<Bar<usize>>`
50 
51 error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied

56    |
56    |
57    = help: the trait `Index<Foo<u32>>` is not implemented for `[i32]`
58    = help: the following other types implement trait `Index<Idx>`:
-              `[i32]` implements `Index<Bar<usize>>`
60              `[i32]` implements `Index<Foo<usize>>`
+              `[i32]` implements `Index<Bar<usize>>`
61 
62 error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied

67    |
67    |
68    = help: the trait `Index<Bar<u32>>` is not implemented for `[i32]`
69    = help: the following other types implement trait `Index<Idx>`:
-              `[i32]` implements `Index<Bar<usize>>`
71              `[i32]` implements `Index<Foo<usize>>`
+              `[i32]` implements `Index<Bar<usize>>`
73 error: aborting due to 6 previous errors
74 



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/on-unimplemented/multiple-impls.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/on-unimplemented/multiple-impls" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied
   |
   |
LL |     Index::index(&[] as &[i32], 2u32);
   |     ------------                ^^^^ trait message
   |     required by a bound introduced by this call
   |
   |
   = help: the trait `Index<u32>` is not implemented for `[i32]`
   = help: the following other types implement trait `Index<Idx>`:
             `[i32]` implements `Index<Foo<usize>>`
             `[i32]` implements `Index<Bar<usize>>`

error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied
   |
   |
LL |     Index::index(&[] as &[i32], Foo(2u32));
   |     ------------                ^^^^^^^^^ on impl for Foo
   |     required by a bound introduced by this call
   |
   |
   = help: the trait `Index<Foo<u32>>` is not implemented for `[i32]`
   = help: the following other types implement trait `Index<Idx>`:
             `[i32]` implements `Index<Foo<usize>>`
             `[i32]` implements `Index<Bar<usize>>`

error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied
   |
   |
LL |     Index::index(&[] as &[i32], Bar(2u32));
   |     ------------                ^^^^^^^^^ on impl for Bar
   |     required by a bound introduced by this call
   |
   |
   = help: the trait `Index<Bar<u32>>` is not implemented for `[i32]`
   = help: the following other types implement trait `Index<Idx>`:
             `[i32]` implements `Index<Foo<usize>>`
             `[i32]` implements `Index<Bar<usize>>`

error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied
   |
   |
LL |     Index::index(&[] as &[i32], 2u32);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait message
   |
   = help: the trait `Index<u32>` is not implemented for `[i32]`
   = help: the following other types implement trait `Index<Idx>`:
             `[i32]` implements `Index<Foo<usize>>`
             `[i32]` implements `Index<Bar<usize>>`

error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied
   |
   |
LL |     Index::index(&[] as &[i32], Foo(2u32));
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ on impl for Foo
   |
   = help: the trait `Index<Foo<u32>>` is not implemented for `[i32]`
   = help: the following other types implement trait `Index<Idx>`:
             `[i32]` implements `Index<Foo<usize>>`
             `[i32]` implements `Index<Bar<usize>>`

error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied
   |
   |
LL |     Index::index(&[] as &[i32], Bar(2u32));
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ on impl for Bar
   |
   = help: the trait `Index<Bar<u32>>` is not implemented for `[i32]`
   = help: the following other types implement trait `Index<Idx>`:
             `[i32]` implements `Index<Foo<usize>>`
             `[i32]` implements `Index<Bar<usize>>`
error: aborting due to 6 previous errors

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


---- [ui] tests/ui/on-unimplemented/sum.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/on-unimplemented/sum/sum.stderr"
diff of stderr:

8    |
9    = help: the trait `Sum<&()>` is not implemented for `i32`
10    = help: the following other types implement trait `Sum<A>`:
-              `i32` implements `Sum<&i32>`
12              `i32` implements `Sum`
+              `i32` implements `Sum<&i32>`
14   --> $DIR/sum.rs:4:18
15    |

30    |
30    |
31    = help: the trait `Product<&()>` is not implemented for `i32`
32    = help: the following other types implement trait `Product<A>`:
-              `i32` implements `Product<&i32>`
34              `i32` implements `Product`
+              `i32` implements `Product<&i32>`
36   --> $DIR/sum.rs:7:18
37    |



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/on-unimplemented/sum.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/on-unimplemented/sum" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `&()`
   |
   |
LL |     vec![(), ()].iter().sum::<i32>();
   |                         ---   ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=&()>`
   |                         required by a bound introduced by this call
   |
   |
   = help: the trait `Sum<&()>` is not implemented for `i32`
   = help: the following other types implement trait `Sum<A>`:
             `i32` implements `Sum`
             `i32` implements `Sum<&i32>`
  --> /checkout/tests/ui/on-unimplemented/sum.rs:4:18
   |
   |
LL |     vec![(), ()].iter().sum::<i32>();
   |     ------------ ^^^^^^ `Iterator::Item` is `&()` here
   |     this expression has type `Vec<()>`
note: required by a bound in `std::iter::Iterator::sum`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:3521:5


error[E0277]: a value of type `i32` cannot be made by multiplying all elements of type `&()` from an iterator
   |
   |
LL |     vec![(), ()].iter().product::<i32>();
   |                         -------   ^^^ value of type `i32` cannot be made by multiplying all elements from a `std::iter::Iterator<Item=&()>`
   |                         required by a bound introduced by this call
   |
   |
   = help: the trait `Product<&()>` is not implemented for `i32`
   = help: the following other types implement trait `Product<A>`:
             `i32` implements `Product`
             `i32` implements `Product<&i32>`
  --> /checkout/tests/ui/on-unimplemented/sum.rs:7:18
   |
   |
LL |     vec![(), ()].iter().product::<i32>();
   |     ------------ ^^^^^^ `Iterator::Item` is `&()` here
   |     this expression has type `Vec<()>`
note: required by a bound in `std::iter::Iterator::product`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:3553:5

---
diff of stderr:

7    |     required by a bound introduced by this call
8    |
9    = help: the following other types implement trait `From<T>`:
+              `Tuple` implements `From<(u8,)>`
10              `Tuple` implements `From<(u8, u8)>`
11              `Tuple` implements `From<(u8, u8, u8)>`
-              `Tuple` implements `From<(u8,)>`
13    = note: required for `u8` to implement `Into<Tuple>`
15   --> $DIR/suggest_tuple_wrap_root_obligation.rs:19:32


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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/on-unimplemented/suggest_tuple_wrap_root_obligation.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/on-unimplemented/suggest_tuple_wrap_root_obligation" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: the trait bound `Tuple: From<u8>` is not satisfied
##[error]  --> /checkout/tests/ui/on-unimplemented/suggest_tuple_wrap_root_obligation.rs:22:24
   |
   |
LL |     convert_into_tuple(42_u8);
   |     ------------------ ^^^^^ the trait `From<u8>` is not implemented for `Tuple`
   |     |
   |     required by a bound introduced by this call
   |
   = help: the following other types implement trait `From<T>`:
             `Tuple` implements `From<(u8,)>`
             `Tuple` implements `From<(u8, u8)>`
             `Tuple` implements `From<(u8, u8, u8)>`
   = note: required for `u8` to implement `Into<Tuple>`
  --> /checkout/tests/ui/on-unimplemented/suggest_tuple_wrap_root_obligation.rs:19:32
   |
   |
LL | fn convert_into_tuple(_x: impl Into<Tuple>) {}
help: use a unary tuple instead
   |
   |
LL |     convert_into_tuple((42_u8,));

error: aborting due to 1 previous error

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


---- [ui] tests/ui/span/multiline-span-simple.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/span/multiline-span-simple/multiline-span-simple.stderr"
diff of stderr:

8    = help: the following other types implement trait `Add<Rhs>`:
9              `&u32` implements `Add<u32>`
10              `&u32` implements `Add`
-              `u32` implements `Add<&u32>`
12              `u32` implements `Add`
+              `u32` implements `Add<&u32>`
14 error: aborting due to 1 previous error
15 



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/span/multiline-span-simple.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/span/multiline-span-simple" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: cannot add `()` to `u32`
##[error]  --> /checkout/tests/ui/span/multiline-span-simple.rs:13:18
   |
   |
LL |     foo(1 as u32 + //~ ERROR cannot add `()` to `u32`
   |                  ^ no implementation for `u32 + ()`
   = help: the trait `Add<()>` is not implemented for `u32`
   = help: the trait `Add<()>` is not implemented for `u32`
   = help: the following other types implement trait `Add<Rhs>`:
             `&u32` implements `Add<u32>`
             `&u32` implements `Add`
             `u32` implements `Add`
             `u32` implements `Add<&u32>`
error: aborting due to 1 previous error

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


---- [ui] tests/ui/suggestions/into-str.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/suggestions/into-str/into-str.stderr"
diff of stderr:

8    |
9    = note: to coerce a `String` into a `&str`, use `&*` as a prefix
10    = help: the following other types implement trait `From<T>`:
-              `String` implements `From<&String>`
-              `String` implements `From<&mut str>`
13              `String` implements `From<&str>`
+              `String` implements `From<&mut str>`
+              `String` implements `From<&String>`
14              `String` implements `From<Box<str>>`
15              `String` implements `From<Cow<'_, str>>`
16              `String` implements `From<char>`

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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/suggestions/into-str.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/suggestions/into-str" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `&str: From<String>` is not satisfied
   |
LL |     foo(String::new());
   |     --- ^^^^^^^^^^^^^ the trait `From<String>` is not implemented for `&str`
   |     |
   |     |
   |     required by a bound introduced by this call
   |
   = note: to coerce a `String` into a `&str`, use `&*` as a prefix
   = help: the following other types implement trait `From<T>`:
             `String` implements `From<&str>`
             `String` implements `From<&mut str>`
             `String` implements `From<&String>`
             `String` implements `From<Box<str>>`
             `String` implements `From<Cow<'_, str>>`
             `String` implements `From<char>`
   = note: required for `String` to implement `Into<&str>`
  --> /checkout/tests/ui/suggestions/into-str.rs:1:31
   |
   |
LL | fn foo<'a, T>(_t: T) where T: Into<&'a str> {}

error: aborting due to 1 previous error

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

21    |
22    = help: the trait `FromIterator<()>` is not implemented for `String`
23    = help: the following other types implement trait `FromIterator<A>`:
+              `String` implements `FromIterator<char>`
24              `String` implements `FromIterator<&char>`
25              `String` implements `FromIterator<&str>`
+              `String` implements `FromIterator<String>`
26              `String` implements `FromIterator<Box<str, A>>`
27              `String` implements `FromIterator<Cow<'_, str>>`
-              `String` implements `FromIterator<String>`
-              `String` implements `FromIterator<char>`
31   --> $DIR/semi-suggestion-when-stmt-and-expr-span-equal.rs:20:10
32    |



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args suggestions/semi-suggestion-when-stmt-and-expr-span-equal.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal.rs:13:5
   |
   |
LL |   fn foo() -> String {
   |               ------ expected `String` because of return type
LL |       let mut list = {
   |  ____________________-
LL | |         println!();
LL | |     };
   | |_____- this block is missing a tail expression
LL |       list //~ ERROR mismatched types
   |       ^^^^ expected `String`, found `()`
error[E0277]: a value of type `String` cannot be built from an iterator over elements of type `()`
##[error]  --> /checkout/tests/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal.rs:23:20
   |
   |
LL |         .collect::<String>(); //~ ERROR E0277
   |          -------   ^^^^^^ value of type `String` cannot be built from `std::iter::Iterator<Item=()>`
   |          required by a bound introduced by this call
   |
   = help: the trait `FromIterator<()>` is not implemented for `String`
   = help: the following other types implement trait `FromIterator<A>`:
   = help: the following other types implement trait `FromIterator<A>`:
             `String` implements `FromIterator<char>`
             `String` implements `FromIterator<&char>`
             `String` implements `FromIterator<&str>`
             `String` implements `FromIterator<String>`
             `String` implements `FromIterator<Box<str, A>>`
             `String` implements `FromIterator<Cow<'_, str>>`
  --> /checkout/tests/ui/suggestions/semi-suggestion-when-stmt-and-expr-span-equal.rs:20:10
   |
LL |       String::new()
   |       ------------- this expression has type `String`
   |       ------------- this expression has type `String`
LL |           .chars()
   |            ------- `Iterator::Item` is `char` here
LL |           .filter(|x| !x.is_whitespace())
   |            ------------------------------ `Iterator::Item` remains `char` here
LL |           .map(|x| {
LL | |             println!("Child spawned with the size: {}", x);
LL | |         })
LL | |         })
   | |__________^ `Iterator::Item` changed to `()` here
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:1967:5

error: aborting due to 2 previous errors

---
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/question-mark-result-err-mismatch/question-mark-result-err-mismatch.stderr"
diff of stderr:

31    |
32    = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
33    = help: the following other types implement trait `From<T>`:
-              `String` implements `From<&String>`
-              `String` implements `From<&mut str>`
36              `String` implements `From<&str>`
+              `String` implements `From<&mut str>`
+              `String` implements `From<&String>`
37              `String` implements `From<Box<str>>`
38              `String` implements `From<Cow<'_, str>>`
39              `String` implements `From<char>`

The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args traits/question-mark-result-err-mismatch.rs`
To only update this specific test, also pass `--test-args traits/question-mark-result-err-mismatch.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/traits/question-mark-result-err-mismatch.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/question-mark-result-err-mismatch" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: `?` couldn't convert the error to `String`
##[error]  --> /checkout/tests/ui/traits/question-mark-result-err-mismatch.rs:15:22
   |
   |
LL |   fn foo() -> Result<String, String> { //~ NOTE expected `String` because of this
   |               ---------------------- expected `String` because of this
...
LL |           .map_err(|e| { //~ NOTE this can't be annotated with `?` because it has type `Result<_, ()>`
   |  __________-
LL | |             e; //~ HELP remove this semicolon
LL | |         })
   | |__________- this can't be annotated with `?` because it has type `Result<_, ()>`
   | |__________- this can't be annotated with `?` because it has type `Result<_, ()>`
LL |           .map(|()| "")?; //~ ERROR `?` couldn't convert the error to `String`
   |                        ^ the trait `From<()>` is not implemented for `String`
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = note: required for `Result<String, String>` to implement `FromResidual<Result<Infallible, ()>>`
error[E0277]: `?` couldn't convert the error to `String`
##[error]  --> /checkout/tests/ui/traits/question-mark-result-err-mismatch.rs:29:25
   |
   |
LL | fn bar() -> Result<(), String> { //~ NOTE expected `String` because of this
   |             ------------------ expected `String` because of this
LL |     let x = foo(); //~ NOTE this has type `Result<_, String>`
   |             ----- this has type `Result<_, String>`
...
LL |         .map_err(|_| ())?; //~ ERROR `?` couldn't convert the error to `String`
   |          ---------------^ the trait `From<()>` is not implemented for `String`
   |          this can't be annotated with `?` because it has type `Result<_, ()>`
   |
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = help: the following other types implement trait `From<T>`:
             `String` implements `From<&str>`
             `String` implements `From<&mut str>`
             `String` implements `From<&String>`
             `String` implements `From<Box<str>>`
             `String` implements `From<Cow<'_, str>>`
             `String` implements `From<char>`
   = note: required for `Result<(), String>` to implement `FromResidual<Result<Infallible, ()>>`
error[E0277]: `?` couldn't convert the error to `String`
##[error]  --> /checkout/tests/ui/traits/question-mark-result-err-mismatch.rs:49:11
   |
   |
LL |   fn baz() -> Result<String, String> { //~ NOTE expected `String` because of this
   |               ---------------------- expected `String` because of this
...
LL |           .ok_or_else(|| { //~ NOTE this can't be annotated with `?` because it has type `Result<_, ()>`
   |  __________-
LL | |             "Couldn't split the test string"; //~ HELP remove this semicolon
LL | |         })?;
LL | |         })?;
   | |          -^ the trait `From<()>` is not implemented for `String`
   |            this can't be annotated with `?` because it has type `Result<_, ()>`
   |
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = note: required for `Result<String, String>` to implement `FromResidual<Result<Infallible, ()>>`
error: aborting due to 3 previous errors

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


---- [ui] tests/ui/try-trait/bad-interconversion.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/try-trait/bad-interconversion/bad-interconversion.stderr"
diff of stderr:

10    |
11    = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
12    = help: the following other types implement trait `From<T>`:
-              `u8` implements `From<Char>`
14              `u8` implements `From<bool>`
+              `u8` implements `From<Char>`
15 
16 error[E0277]: the `?` operator can only be used on `Result`s, not `Option`s, in a function that returns `Result`


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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/try-trait/bad-interconversion.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/try-trait/bad-interconversion" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: `?` couldn't convert the error to `u8`
##[error]  --> /checkout/tests/ui/try-trait/bad-interconversion.rs:4:20
   |
   |
LL | fn result_to_result() -> Result<u64, u8> {
   |                          --------------- expected `u8` because of this
LL |     Ok(Err(123_i32)?)
   |        ------------^ the trait `From<i32>` is not implemented for `u8`
   |        |
   |        this can't be annotated with `?` because it has type `Result<_, i32>`
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = help: the following other types implement trait `From<T>`:
             `u8` implements `From<bool>`
             `u8` implements `From<Char>`

error[E0277]: the `?` operator can only be used on `Result`s, not `Option`s, in a function that returns `Result`
   |
LL | fn option_to_result() -> Result<u64, String> {
   | -------------------------------------------- this function returns a `Result`
LL |     Some(3)?;
LL |     Some(3)?;
   |            ^ use `.ok_or(...)?` to provide an error compatible with `Result<u64, String>`
error[E0277]: the `?` operator can only be used on `Result`s in a function that returns `Result`
##[error]  --> /checkout/tests/ui/try-trait/bad-interconversion.rs:15:31
   |
LL | fn control_flow_to_result() -> Result<u64, String> {
LL | fn control_flow_to_result() -> Result<u64, String> {
   | -------------------------------------------------- this function returns a `Result`
LL |     Ok(ControlFlow::Break(123)?)
   |                               ^ this `?` produces `ControlFlow<{integer}, Infallible>`, which is incompatible with `Result<u64, String>`

error[E0277]: the `?` operator can only be used on `Option`s, not `Result`s, in a function that returns `Option`
   |
LL | fn result_to_option() -> Option<u16> {
   | ------------------------------------ this function returns an `Option`
LL |     Some(Err("hello")?)
LL |     Some(Err("hello")?)
   |                      ^ use `.ok()?` if you want to discard the `Result<Infallible, &str>` error information
error[E0277]: the `?` operator can only be used on `Option`s in a function that returns `Option`
##[error]  --> /checkout/tests/ui/try-trait/bad-interconversion.rs:25:33
   |
LL | fn control_flow_to_option() -> Option<u64> {
LL | fn control_flow_to_option() -> Option<u64> {
   | ------------------------------------------ this function returns an `Option`
LL |     Some(ControlFlow::Break(123)?)
   |                                 ^ this `?` produces `ControlFlow<{integer}, Infallible>`, which is incompatible with `Option<u64>`
error[E0277]: the `?` operator can only be used on `ControlFlow`s in a function that returns `ControlFlow`
##[error]  --> /checkout/tests/ui/try-trait/bad-interconversion.rs:30:39
   |
LL | fn result_to_control_flow() -> ControlFlow<String> {
LL | fn result_to_control_flow() -> ControlFlow<String> {
   | -------------------------------------------------- this function returns a `ControlFlow`
LL |     ControlFlow::Continue(Err("hello")?)
   |                                       ^ this `?` produces `Result<Infallible, &str>`, which is incompatible with `ControlFlow<String>`
   |
   = help: the trait `FromResidual<Result<Infallible, &str>>` is not implemented for `ControlFlow<String>`
           but trait `FromResidual<ControlFlow<String, Infallible>>` is implemented for it
   = help: for that trait implementation, expected `ControlFlow<String, Infallible>`, found `Result<Infallible, &str>`
error[E0277]: the `?` operator can only be used on `ControlFlow`s in a function that returns `ControlFlow`
##[error]  --> /checkout/tests/ui/try-trait/bad-interconversion.rs:35:12
   |
LL | fn option_to_control_flow() -> ControlFlow<u64> {
LL | fn option_to_control_flow() -> ControlFlow<u64> {
   | ----------------------------------------------- this function returns a `ControlFlow`
LL |     Some(3)?;
   |            ^ this `?` produces `Option<Infallible>`, which is incompatible with `ControlFlow<u64>`
   |
   = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `ControlFlow<u64>`
           but trait `FromResidual<ControlFlow<u64, Infallible>>` is implemented for it
   = help: for that trait implementation, expected `ControlFlow<u64, Infallible>`, found `Option<Infallible>`

error[E0277]: the `?` operator in a function that returns `ControlFlow<B, _>` can only be used on other `ControlFlow<B, _>`s (with the same Break type)
   |
LL | fn control_flow_to_control_flow() -> ControlFlow<i64> {
   | ----------------------------------------------------- this function returns a `ControlFlow`
   | ----------------------------------------------------- this function returns a `ControlFlow`
LL |     ControlFlow::Break(4_u8)?;
   |                             ^ this `?` produces `ControlFlow<u8, Infallible>`, which is incompatible with `ControlFlow<i64>`
   |
   = note: unlike `Result`, there's no `From`-conversion performed for `ControlFlow`
   = help: the trait `FromResidual<ControlFlow<u8, _>>` is not implemented for `ControlFlow<i64>`
           but trait `FromResidual<ControlFlow<i64, _>>` is implemented for it
   = help: for that trait implementation, expected `i64`, found `u8`
error: aborting due to 8 previous errors

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


---- [ui] tests/ui/try-trait/issue-32709.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/try-trait/issue-32709/issue-32709.stderr"
diff of stderr:

10    |
11    = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
12    = help: the following other types implement trait `From<T>`:
+              `(T,)` implements `From<[T; 1]>`
13              `(T, T)` implements `From<[T; 2]>`
14              `(T, T, T)` implements `From<[T; 3]>`
15              `(T, T, T, T)` implements `From<[T; 4]>`

17              `(T, T, T, T, T, T)` implements `From<[T; 6]>`
18              `(T, T, T, T, T, T, T)` implements `From<[T; 7]>`
19              `(T, T, T, T, T, T, T, T)` implements `From<[T; 8]>`
-              `(T, T, T, T, T, T, T, T, T)` implements `From<[T; 9]>`
22 
23 error: aborting due to 1 previous error



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/try-trait/issue-32709.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/try-trait/issue-32709" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: `?` couldn't convert the error to `()`
##[error]  --> /checkout/tests/ui/try-trait/issue-32709.rs:4:11
   |
   |
LL | fn a() -> Result<i32, ()> {
   |           --------------- expected `()` because of this
LL |     Err(5)?; //~ ERROR
   |     ------^ the trait `From<{integer}>` is not implemented for `()`
   |     this can't be annotated with `?` because it has type `Result<_, {integer}>`
   |
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = help: the following other types implement trait `From<T>`:
             `(T,)` implements `From<[T; 1]>`
             `(T, T)` implements `From<[T; 2]>`
             `(T, T, T)` implements `From<[T; 3]>`
             `(T, T, T, T)` implements `From<[T; 4]>`
             `(T, T, T, T, T)` implements `From<[T; 5]>`
             `(T, T, T, T, T, T)` implements `From<[T; 6]>`
             `(T, T, T, T, T, T, T)` implements `From<[T; 7]>`
             `(T, T, T, T, T, T, T, T)` implements `From<[T; 8]>`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
---
To only update this specific test, also pass `--test-args type/pattern_types/signed_ranges.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/type/pattern_types/signed_ranges.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type/pattern_types/signed_ranges" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `u8: Neg` is not satisfied
   |
LL |         -10..253 => {}
   |         ^^^ the trait `Neg` is not implemented for `u8`
   |
---

error[E0277]: the trait bound `char: Neg` is not satisfied
##[error]  --> /checkout/tests/ui/type/pattern_types/signed_ranges.rs:20:9
   |
LL |         -'\0'..'a' => {}
   |         ^^^^^ the trait `Neg` is not implemented for `char`
error[E0600]: cannot apply unary operator `-` to type `u32`
##[error]  --> /checkout/tests/ui/type/pattern_types/signed_ranges.rs:6:34
   |
   |
LL | type Sign = pattern_type!(u32 is -10..);
   |                                  ^^^ cannot apply unary operator `-`
   = note: unsigned values cannot be negated

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

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


---- [ui] tests/ui/type/type-check-defaults.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type/type-check-defaults/type-check-defaults.stderr"
diff of stderr:

68    = help: the following other types implement trait `Add<Rhs>`:
69              `&i32` implements `Add<i32>`
70              `&i32` implements `Add`
-              `i32` implements `Add<&i32>`
72              `i32` implements `Add`
+              `i32` implements `Add<&i32>`
74 error: aborting due to 7 previous errors
75 



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/type/type-check-defaults.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type/type-check-defaults" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: a value of type `i32` cannot be built from an iterator over elements of type `i32`
   |
   |
LL | struct WellFormed<Z = Foo<i32, i32>>(Z);
   |                       ^^^^^^^^^^^^^ value of type `i32` cannot be built from `std::iter::Iterator<Item=i32>`
   = help: the trait `FromIterator<i32>` is not implemented for `i32`
note: required by a bound in `Foo`
  --> /checkout/tests/ui/type/type-check-defaults.rs:5:18
   |
   |
LL | struct Foo<T, U: FromIterator<T>>(T, U);


error[E0277]: a value of type `i32` cannot be built from an iterator over elements of type `i32`
   |
   |
LL | struct WellFormedNoBounds<Z:?Sized = Foo<i32, i32>>(Z);
   |                                      ^^^^^^^^^^^^^ value of type `i32` cannot be built from `std::iter::Iterator<Item=i32>`
   = help: the trait `FromIterator<i32>` is not implemented for `i32`
note: required by a bound in `Foo`
  --> /checkout/tests/ui/type/type-check-defaults.rs:5:18
   |
   |
LL | struct Foo<T, U: FromIterator<T>>(T, U);

error[E0277]: the trait bound `String: Copy` is not satisfied
##[error]  --> /checkout/tests/ui/type/type-check-defaults.rs:11:17
   |
   |
LL | struct Bounds<T:Copy=String>(T);

error[E0277]: the trait bound `String: Copy` is not satisfied
##[error]  --> /checkout/tests/ui/type/type-check-defaults.rs:14:42
   |
   |
LL | struct WhereClause<T=String>(T) where T: Copy;

error[E0277]: the trait bound `String: Copy` is not satisfied
##[error]  --> /checkout/tests/ui/type/type-check-defaults.rs:17:20
   |
   |
LL | trait TraitBound<T:Copy=String> {}

error[E0277]: the trait bound `T: Copy` is not satisfied
##[error]  --> /checkout/tests/ui/type/type-check-defaults.rs:21:25
   |
   |
LL | trait Base<T = String>: Super<T> { }
   |                         ^^^^^^^^ the trait `Copy` is not implemented for `T`
note: required by a bound in `Super`
  --> /checkout/tests/ui/type/type-check-defaults.rs:20:16
   |
   |
LL | trait Super<T: Copy> { }
   |                ^^^^ required by this bound in `Super`
help: consider further restricting type parameter `T` with trait `Copy`
   |
LL | trait Base<T = String>: Super<T> where T: std::marker::Copy { }

error[E0277]: cannot add `u8` to `i32`
##[error]  --> /checkout/tests/ui/type/type-check-defaults.rs:24:66
   |
   |
LL | trait ProjectionPred<T:Iterator = IntoIter<i32>> where T::Item : Add<u8> {}
   |                                                                  ^^^^^^^ no implementation for `i32 + u8`
   = help: the trait `Add<u8>` is not implemented for `i32`
   = help: the trait `Add<u8>` is not implemented for `i32`
   = help: the following other types implement trait `Add<Rhs>`:
             `&i32` implements `Add<i32>`
             `&i32` implements `Add`
             `i32` implements `Add`
             `i32` implements `Add<&i32>`
error: aborting due to 7 previous errors

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


---- [ui] tests/ui/typeck/issue-81293.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/typeck/issue-81293/issue-81293.stderr"
diff of stderr:

23    = help: the following other types implement trait `Add<Rhs>`:
24              `&usize` implements `Add<usize>`
25              `&usize` implements `Add`
-              `usize` implements `Add<&usize>`
27              `usize` implements `Add`
+              `usize` implements `Add<&usize>`
29 error: aborting due to 3 previous errors
30 



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/typeck/issue-81293.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/typeck/issue-81293" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/typeck/issue-81293.rs:6:13
   |
   |
LL |     a = c + b * 5; //~ ERROR: mismatched types [E0308]
   |             ^^^^^ expected `usize`, found `u16`
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/typeck/issue-81293.rs:6:9
   |
LL |     let a: u16;
LL |     let a: u16;
   |            --- expected due to this type
...
LL |     a = c + b * 5; //~ ERROR: mismatched types [E0308]
   |         ^^^^^^^^^ expected `u16`, found `usize`
error[E0277]: cannot add `u16` to `usize`
##[error]  --> /checkout/tests/ui/typeck/issue-81293.rs:6:11
   |
   |
LL |     a = c + b * 5; //~ ERROR: mismatched types [E0308]
   |           ^ no implementation for `usize + u16`
   = help: the trait `Add<u16>` is not implemented for `usize`
   = help: the trait `Add<u16>` is not implemented for `usize`
   = help: the following other types implement trait `Add<Rhs>`:
             `&usize` implements `Add<usize>`
             `&usize` implements `Add`
             `usize` implements `Add`
             `usize` implements `Add<&usize>`
error: aborting due to 3 previous errors

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

7    |     required by a bound introduced by this call
8    |
9    = help: the following other types implement trait `From<T>`:
-              `PathBuf` implements `From<&T>`
11              `PathBuf` implements `From<Box<Path>>`
-              `PathBuf` implements `From<Cow<'_, Path>>`
+              `PathBuf` implements `From<&T>`
13              `PathBuf` implements `From<OsString>`
14              `PathBuf` implements `From<String>`
+              `PathBuf` implements `From<Cow<'_, Path>>`
15    = note: required for `Cow<'_, str>` to implement `Into<PathBuf>`
16 note: required by a bound in `func`


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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/typeck/issue-90101.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/typeck/issue-90101" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `PathBuf: From<Cow<'_, str>>` is not satisfied
   |
   |
LL |     func(Path::new("hello").to_path_buf().to_string_lossy(), "world")
   |     ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<Cow<'_, str>>` is not implemented for `PathBuf`
   |     required by a bound introduced by this call
   |
   = help: the following other types implement trait `From<T>`:
   = help: the following other types implement trait `From<T>`:
             `PathBuf` implements `From<Box<Path>>`
             `PathBuf` implements `From<&T>`
             `PathBuf` implements `From<OsString>`
             `PathBuf` implements `From<String>`
             `PathBuf` implements `From<Cow<'_, Path>>`
   = note: required for `Cow<'_, str>` to implement `Into<PathBuf>`
note: required by a bound in `func`
   |
   |
LL | fn func(path: impl Into<PathBuf>, code: impl Into<String>) {}
   |                    ^^^^^^^^^^^^^ required by this bound in `func`
error: aborting due to 1 previous error

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


---- [ui] tests/ui/ufcs/ufcs-qpath-self-mismatch.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/ufcs/ufcs-qpath-self-mismatch/ufcs-qpath-self-mismatch.stderr"
diff of stderr:

8    = help: the following other types implement trait `Add<Rhs>`:
9              `&i32` implements `Add<i32>`
10              `&i32` implements `Add`
-              `i32` implements `Add<&i32>`
12              `i32` implements `Add`
+              `i32` implements `Add<&i32>`
14 error[E0308]: mismatched types
15   --> $DIR/ufcs-qpath-self-mismatch.rs:7:28


67    = help: the following other types implement trait `Add<Rhs>`:
68              `&i32` implements `Add<i32>`
69              `&i32` implements `Add`
-              `i32` implements `Add<&i32>`
71              `i32` implements `Add`
+              `i32` implements `Add<&i32>`
73 error: aborting due to 4 previous errors
74 



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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/ufcs/ufcs-qpath-self-mismatch.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/ufcs/ufcs-qpath-self-mismatch" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0277]: cannot add `u32` to `i32`
##[error]  --> /checkout/tests/ui/ufcs/ufcs-qpath-self-mismatch.rs:4:6
   |
   |
LL |     <i32 as Add<u32>>::add(1, 2);
   |      ^^^ no implementation for `i32 + u32`
   = help: the trait `Add<u32>` is not implemented for `i32`
   = help: the trait `Add<u32>` is not implemented for `i32`
   = help: the following other types implement trait `Add<Rhs>`:
             `&i32` implements `Add<i32>`
             `&i32` implements `Add`
             `i32` implements `Add`
             `i32` implements `Add<&i32>`
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/ufcs/ufcs-qpath-self-mismatch.rs:7:28
   |
   |
LL |     <i32 as Add<i32>>::add(1u32, 2);
   |     ---------------------- ^^^^ expected `i32`, found `u32`
   |     arguments to this function are incorrect
   |
help: the return type of this call is `u32` due to the type of the argument passed
  --> /checkout/tests/ui/ufcs/ufcs-qpath-self-mismatch.rs:7:5
  --> /checkout/tests/ui/ufcs/ufcs-qpath-self-mismatch.rs:7:5
   |
LL |     <i32 as Add<i32>>::add(1u32, 2);
   |                            |
   |                            this argument influences the return type of `Add`
note: method defined here
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:93:8
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:93:8
help: change the type of the numeric literal from `u32` to `i32`
   |
LL -     <i32 as Add<i32>>::add(1u32, 2);
LL +     <i32 as Add<i32>>::add(1i32, 2);

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/ufcs/ufcs-qpath-self-mismatch.rs:9:31
   |
   |
LL |     <i32 as Add<i32>>::add(1, 2u32);
   |     ----------------------    ^^^^ expected `i32`, found `u32`
   |     arguments to this function are incorrect
   |
help: the return type of this call is `u32` due to the type of the argument passed
  --> /checkout/tests/ui/ufcs/ufcs-qpath-self-mismatch.rs:9:5
  --> /checkout/tests/ui/ufcs/ufcs-qpath-self-mismatch.rs:9:5
   |
LL |     <i32 as Add<i32>>::add(1, 2u32);
   |                               |
   |                               this argument influences the return type of `Add`
note: method defined here
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:93:8
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:93:8
help: change the type of the numeric literal from `u32` to `i32`
   |
LL -     <i32 as Add<i32>>::add(1, 2u32);
LL +     <i32 as Add<i32>>::add(1, 2i32);

error[E0277]: cannot add `u32` to `i32`
##[error]  --> /checkout/tests/ui/ufcs/ufcs-qpath-self-mismatch.rs:4:5
   |
   |
LL |     <i32 as Add<u32>>::add(1, 2);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `i32 + u32`
   = help: the trait `Add<u32>` is not implemented for `i32`
   = help: the trait `Add<u32>` is not implemented for `i32`
   = help: the following other types implement trait `Add<Rhs>`:
             `&i32` implements `Add<i32>`
             `&i32` implements `Add`
             `i32` implements `Add`
             `i32` implements `Add<&i32>`
error: aborting due to 4 previous errors

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

@tapanprakasht tapanprakasht marked this pull request as draft February 22, 2025 16:29
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

Please sort by args.len() then the trait ref rendered as a string, otherwise you'll reintroduce some instability in trait ordering when you have two trait refs with the same number of args but different names

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List of trait implementations should be version-sorted
4 participants