Skip to content

Conversation

@estebank
Copy link
Contributor

@estebank estebank commented Nov 8, 2025

Address issue noticed at https://users.rust-lang.org/t/error-message-does-not-specify-where-in-macro/135157/1

error[E0308]: mismatched types
  --> $DIR/macro-span-caller-replacement.rs:5:17
   |
LL |             s = format!("{arg}");
   |                 ^^^^^^^^^^^^^^^^ expected `&str`, found `String`
...
LL |     macro_with_format!();
   |     -------------------- in this macro invocation
   |
   = note: this error originates in the macro `format` which comes from the expansion of the macro `macro_with_format` (in Nightly builds, run with -Z macro-backtrace for more info)

…xternal macro

```
error[E0308]: mismatched types
  --> $DIR/macro-span-caller-replacement.rs:5:17
   |
LL |             s = format!("{arg}");
   |                 ^^^^^^^^^^^^^^^^ expected `&str`, found `String`
...
LL |     macro_with_format!();
   |     -------------------- in this macro invocation
   |
   = note: this error originates in the macro `format` which comes from the expansion of the macro `macro_with_format` (in Nightly builds, run with -Z macro-backtrace for more info)
```
@rustbot
Copy link
Collaborator

rustbot commented Nov 8, 2025

rustc_errors::emitter was changed

cc @Muscraft

@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 Nov 8, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 8, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
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

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/binop/binary-op-suggest-deref.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/binop/binary-op-suggest-deref/binary-op-suggest-deref.stderr`
diff of stderr:

314    = note: `&i32` implements `BitAnd<i32>`
315   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
316    |
-    = note: `i32` implements `BitAnd<&i32>`
+    = note: `&i32` implements `BitAnd`
318   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
319    |
-    = note: `&i32` implements `BitAnd`
+    = note: `i32` implements `BitAnd<&i32>`
321    = note: this error originates in the macro `bitand_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
322 
323 error[E0277]: the size for values of type `str` cannot be known at compilation time


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

error[E0277]: no implementation for `i32 & str`
##[error]  --> /checkout/tests/ui/binop/binary-op-suggest-deref.rs:78:17
   |
LL |     let _ = FOO & (*"Sized".to_string().into_boxed_str());
   |                 ^ no implementation for `i32 & str`
   |
   = help: the trait `BitAnd<str>` is not implemented for `i32`
help: the following other types implement trait `BitAnd<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/bit.rs:174:8
   |
   = note: `i32` implements `BitAnd`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/bit.rs:187:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&i32` implements `BitAnd<i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&i32` implements `BitAnd`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `i32` implements `BitAnd<&i32>`
   = note: this error originates in the macro `bitand_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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

error: aborting due to 24 previous errors

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

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

17    = note: `&i32` implements `Mul<i32>`
18   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
19    |
-    = note: `i32` implements `Mul<&i32>`
+    = note: `&i32` implements `Mul`
21   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
22    |
-    = note: `&i32` implements `Mul`
+    = note: `i32` implements `Mul<&i32>`
24    = note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
25 
26 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 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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/binop/binop-mul-i32-f32" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: cannot multiply `i32` by `f32`
##[error]  --> /checkout/tests/ui/binop/binop-mul-i32-f32.rs:2:7
   |
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>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:346:8
   |
   = note: `i32` implements `Mul`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:361:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&i32` implements `Mul<i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&i32` implements `Mul`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `i32` implements `Mul<&i32>`
   = note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error

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

---- [ui] tests/ui/binop/binop-mul-i32-f32.rs stdout end ----
---- [ui] tests/ui/consts/const-eval/const-eval-overflow-3b.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/consts/const-eval/const-eval-overflow-3b/const-eval-overflow-3b.stderr`
diff of stderr:

23    = note: `&i8` implements `Add<i8>`
24   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
25    |
-    = note: `i8` implements `Add<&i8>`
+    = note: `&i8` implements `Add`
27   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
28    |
-    = note: `&i8` implements `Add`
+    = note: `i8` implements `Add<&i8>`
30    = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
31 
32 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 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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/consts/const-eval/const-eval-overflow-3b" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/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 following other types implement trait `Add<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `i8` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&i8` implements `Add<i8>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&i8` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `i8` implements `Add<&i8>`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 2 previous errors

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

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

23    = note: `&i8` implements `Add<i8>`
24   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
25    |
-    = note: `i8` implements `Add<&i8>`
+    = note: `&i8` implements `Add`
27   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
28    |
-    = note: `&i8` implements `Add`
+    = note: `i8` implements `Add<&i8>`
---
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/consts/const-eval/parse_ints/parse_ints.stderr`
diff of stderr:

6    |
7 note: inside `core::num::<impl u64>::from_str_radix`
8   --> $SRC_DIR/core/src/num/mod.rs:LL:COL
-   ::: $SRC_DIR/core/src/num/mod.rs:LL:COL
10    |
11    = note: in this macro invocation
12 note: inside `core::num::<impl u64>::from_ascii_radix`

13   --> $SRC_DIR/core/src/num/mod.rs:LL:COL
-   ::: $SRC_DIR/core/src/num/mod.rs:LL:COL
15    |
16    = note: in this macro invocation
17    = note: this error originates in the macro `from_str_int_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

24    |
25 note: inside `core::num::<impl u64>::from_str_radix`
26   --> $SRC_DIR/core/src/num/mod.rs:LL:COL
-   ::: $SRC_DIR/core/src/num/mod.rs:LL:COL
28    |
29    = note: in this macro invocation
30 note: inside `core::num::<impl u64>::from_ascii_radix`

31   --> $SRC_DIR/core/src/num/mod.rs:LL:COL
-   ::: $SRC_DIR/core/src/num/mod.rs:LL:COL
33    |
34    = note: in this macro invocation
---
To only update this specific test, also pass `--test-args consts/const-eval/parse_ints.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/const-eval/parse_ints.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/consts/const-eval/parse_ints" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0080]: evaluation panicked: from_ascii_radix: radix must lie in the range `[2, 36]`
##[error]  --> /checkout/tests/ui/consts/const-eval/parse_ints.rs:7:24
   |
LL | const _TOO_LOW: () = { u64::from_str_radix("12345ABCD", 1); }; //~ ERROR radix must lie in the range `[2, 36]`
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `_TOO_LOW` failed inside this call
   |
note: inside `core::num::<impl u64>::from_str_radix`
  --> /rustc/FAKE_PREFIX/library/core/src/num/mod.rs:1667:0
   |
   = note: in this macro invocation
note: inside `core::num::<impl u64>::from_ascii_radix`
  --> /rustc/FAKE_PREFIX/library/core/src/num/mod.rs:1667:0
   |
   = note: in this macro invocation
   = note: this error originates in the macro `from_str_int_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0080]: evaluation panicked: from_ascii_radix: radix must lie in the range `[2, 36]`
##[error]  --> /checkout/tests/ui/consts/const-eval/parse_ints.rs:8:25
   |
LL | const _TOO_HIGH: () = { u64::from_str_radix("12345ABCD", 37); }; //~ ERROR radix must lie in the range `[2, 36]`
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `_TOO_HIGH` failed inside this call
   |
note: inside `core::num::<impl u64>::from_str_radix`
  --> /rustc/FAKE_PREFIX/library/core/src/num/mod.rs:1667:0
   |
   = note: in this macro invocation
note: inside `core::num::<impl u64>::from_ascii_radix`
  --> /rustc/FAKE_PREFIX/library/core/src/num/mod.rs:1667:0
   |
   = note: in this macro invocation
   = note: this error originates in the macro `from_str_int_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/timeout.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/consts/timeout" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--crate-type=lib" "-Ztiny-const-eval-limit"
stdout: none
--- stderr -------------------------------
error: constant evaluation is taking a long time
##[error]  --> /rustc/FAKE_PREFIX/library/core/src/num/uint_macros.rs:82:19
   |
---
           If your compilation actually takes a long time, you can safely allow the lint.
help: the constant being evaluated
  --> /checkout/tests/ui/consts/timeout.rs:7:1
   |
LL | static ROOK_ATTACKS_TABLE: () = {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: `#[deny(long_running_const_eval)]` on by default
   = note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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

---- [ui] tests/ui/consts/timeout.rs stdout end ----
---- [ui] tests/ui/impl-trait/equality.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/impl-trait/equality/equality.stderr`
diff of stderr:

42    = note: `&u32` implements `Add<u32>`
43   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
44    |
-    = note: `u32` implements `Add<&u32>`
+    = note: `&u32` implements `Add`
46   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
47    |
-    = note: `&u32` implements `Add`
+    = note: `u32` implements `Add<&u32>`
49    = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
50 
51 error: aborting due to 2 previous errors; 1 warning emitted


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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/impl-trait/equality" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
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:3: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
---

error[E0277]: cannot add `impl Foo` to `u32`
##[error]  --> /checkout/tests/ui/impl-trait/equality.rs:26: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>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `u32` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&u32` implements `Add<u32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&u32` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `u32` implements `Add<&u32>`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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

36 help: the following other types implement trait `Sum<A>`
37   --> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
38    |
-    = note: `i32` implements `Sum`
+    = note: `i32` implements `Sum<&i32>`
40   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
41    |
-    = note: `i32` implements `Sum<&i32>`
+    = note: `i32` implements `Sum`
43   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
44    |
45    = note: in this macro invocation

77 help: the following other types implement trait `Sum<A>`
78   --> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
79    |
-    = note: `i32` implements `Sum`
+    = note: `i32` implements `Sum<&i32>`
81   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
82    |
-    = note: `i32` implements `Sum<&i32>`
+    = note: `i32` implements `Sum`
84   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
85    |
86    = note: in this macro invocation

118 help: the following other types implement trait `Sum<A>`
119   --> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
120    |
-    = note: `i32` implements `Sum`
+    = note: `i32` implements `Sum<&i32>`
122   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
123    |
-    = note: `i32` implements `Sum<&i32>`
+    = note: `i32` implements `Sum`
125   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
126    |
127    = note: in this macro invocation


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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/iterators/invalid-iterator-chain-fixable" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: a value of type `Vec<X>` cannot be built from an iterator over elements of type `&X`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain-fixable.rs:7:7
   |
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
  --> /rustc/FAKE_PREFIX/library/alloc/src/vec/mod.rs:3668:0
   = help: for that trait implementation, expected `X`, found `&X`
note: the method call chain might not have had the expected associated types
  --> /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
note: required by a bound in `collect`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:2015:4
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 `()`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain-fixable.rs:17:33
   |
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 following other types implement trait `Sum<A>`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:70:8
   |
   = note: `i32` implements `Sum<&i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:48:8
   |
   = note: `i32` implements `Sum`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:204:0
   |
   = note: in this macro invocation
note: the method call chain might not have had the expected associated types
  --> /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 | |         });
   | |__________^ `Iterator::Item` changed to `()` here
note: required by a bound in `std::iter::Iterator::sum`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:3576:4
   = note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider removing this semicolon
   |
LL -             a + b;
LL +             a + b
   |

error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain-fixable.rs:25:20
   |
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 following other types implement trait `Sum<A>`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:70:8
   |
   = note: `i32` implements `Sum<&i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:48:8
   |
   = note: `i32` implements `Sum`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:204:0
   |
   = note: in this macro invocation
note: the method call chain might not have had the expected associated types
  --> /checkout/tests/ui/iterators/invalid-iterator-chain-fixable.rs:23:14
   |
LL |         vec![0, 1]
   |         ---------- 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`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:3576:4
   = note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
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 `()`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain-fixable.rs:27:60
   |
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 following other types implement trait `Sum<A>`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:70:8
   |
   = note: `i32` implements `Sum<&i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:48:8
   |
   = note: `i32` implements `Sum`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:204:0
   |
   = note: in this macro invocation
note: the method call chain might not have had the expected associated types
  --> /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`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:3576:4
   = note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
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 `()`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain-fixable.rs:36:25
   |
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
  --> /rustc/FAKE_PREFIX/library/alloc/src/vec/mod.rs:3668:0
   = help: for that trait implementation, expected `i32`, found `()`
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 | |     });
   | |______^ `Iterator::Item` changed to `()` here
LL |       let f = e.filter(|_| false);
   |                 ----------------- `Iterator::Item` remains `()` here
note: required by a bound in `collect`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:2015:4
help: consider removing this semicolon
   |
LL -         x + 1;
---

10 help: the following other types implement trait `Sum<A>`
11   --> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
12    |
-    = note: `f32` implements `Sum`
+    = note: `f32` implements `Sum<&f32>`
14   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
15    |
-    = note: `f32` implements `Sum<&f32>`
+    = note: `f32` implements `Sum`
17   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
18    |
19    = note: in this macro invocation


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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/iterators/invalid-iterator-chain-with-int-infer" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: a value of type `f32` cannot be made by summing an iterator over elements of type `{integer}`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain-with-int-infer.rs:2:47
   |
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 following other types implement trait `Sum<A>`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:181:8
   |
   = note: `f32` implements `Sum<&f32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:159:8
   |
   = note: `f32` implements `Sum`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:206:0
   |
   = note: in this macro invocation
note: the method call chain might not have had the expected associated types
  --> /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`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:3576:4
   = note: this error originates in the macro `float_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error

---

36 help: the following other types implement trait `Sum<A>`
37   --> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
38    |
-    = note: `i32` implements `Sum`
+    = note: `i32` implements `Sum<&i32>`
40   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
41    |
-    = note: `i32` implements `Sum<&i32>`
+    = note: `i32` implements `Sum`
43   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
44    |
45    = note: in this macro invocation

76 help: the following other types implement trait `Sum<A>`
77   --> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
78    |
-    = note: `i32` implements `Sum`
+    = note: `i32` implements `Sum<&i32>`
80   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
81    |
-    = note: `i32` implements `Sum<&i32>`
+    = note: `i32` implements `Sum`
83   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
84    |
85    = note: in this macro invocation

123 help: the following other types implement trait `Sum<A>`
124   --> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
125    |
-    = note: `i32` implements `Sum`
+    = note: `i32` implements `Sum<&i32>`
127   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
128    |
-    = note: `i32` implements `Sum<&i32>`
+    = note: `i32` implements `Sum`
130   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
131    |
132    = note: in this macro invocation

161 help: the following other types implement trait `Sum<A>`
162   --> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
163    |
-    = note: `i32` implements `Sum`
+    = note: `i32` implements `Sum<&i32>`
165   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
166    |
-    = note: `i32` implements `Sum<&i32>`
+    = note: `i32` implements `Sum`
168   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
169    |
170    = note: in this macro invocation

197 help: the following other types implement trait `Sum<A>`
198   --> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
199    |
-    = note: `i32` implements `Sum`
+    = note: `i32` implements `Sum<&i32>`
201   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
202    |
-    = note: `i32` implements `Sum<&i32>`
+    = note: `i32` implements `Sum`
204   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
205    |
206    = note: in this macro invocation


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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/iterators/invalid-iterator-chain" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: a value of type `Vec<X>` cannot be built from an iterator over elements of type `&X`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:6:7
   |
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
  --> /rustc/FAKE_PREFIX/library/alloc/src/vec/mod.rs:3668:0
   = help: for that trait implementation, expected `X`, found `&X`
note: the method call chain might not have had the expected associated types
  --> /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
note: required by a bound in `collect`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:2015:4
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 `()`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:15:33
   |
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 following other types implement trait `Sum<A>`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:70:8
   |
   = note: `i32` implements `Sum<&i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:48:8
   |
   = note: `i32` implements `Sum`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:204:0
   |
   = note: in this macro invocation
note: the method call chain might not have had the expected associated types
  --> /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 | |         });
   | |__________^ `Iterator::Item` changed to `()` here
note: required by a bound in `std::iter::Iterator::sum`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:3576:4
   = note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider removing this semicolon
   |
LL -             a + b;
LL +             a + b
   |

error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:26:20
   |
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 following other types implement trait `Sum<A>`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:70:8
   |
   = note: `i32` implements `Sum<&i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:48:8
   |
   = note: `i32` implements `Sum`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:204:0
   |
   = note: in this macro invocation
note: the method call chain might not have had the expected associated types
  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:25:14
   |
LL |         vec![0, 1]
   |         ---------- 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`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:3576:4
   = note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
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`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:36:20
   |
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>`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:70:8
   |
   = note: `i32` implements `Sum<&i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:48:8
   |
   = note: `i32` implements `Sum`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:204:0
   |
   = note: in this macro invocation
note: the method call chain might not have had the expected associated types
  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:33:14
   |
LL |         vec![0, 1]
   |         ---------- 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`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:3576:4
   = note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:38:60
   |
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 following other types implement trait `Sum<A>`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:70:8
   |
   = note: `i32` implements `Sum<&i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:48:8
   |
   = note: `i32` implements `Sum`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:204:0
   |
   = note: in this macro invocation
note: the method call chain might not have had the expected associated types
  --> /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`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:3576:4
   = note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
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 `&()`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:39:46
   |
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>`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:70:8
   |
   = note: `i32` implements `Sum<&i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:48:8
   |
   = note: `i32` implements `Sum`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:204:0
   |
   = note: in this macro invocation
note: the method call chain might not have had the expected associated types
  --> /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:3576:4
   = note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: a value of type `Vec<i32>` cannot be built from an iterator over elements of type `()`
##[error]  --> /checkout/tests/ui/iterators/invalid-iterator-chain.rs:48:25
   |
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
  --> /rustc/FAKE_PREFIX/library/alloc/src/vec/mod.rs:3668:0
   = help: for that trait implementation, expected `i32`, found `()`
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 | |     });
   | |______^ `Iterator::Item` changed to `()` here
LL |       let f = e.filter(|_| false);
   |                 ----------------- `Iterator::Item` remains `()` here
note: required by a bound in `collect`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/iterator.rs:2015:4
help: consider removing this semicolon
   |
LL -         x + 1;
---
---- [ui] tests/ui/mismatched_types/binops.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/mismatched_types/binops/binops.stderr`
diff of stderr:

35    = note: `&usize` implements `Sub<usize>`
36   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
37    |
-    = note: `usize` implements `Sub<&usize>`
+    = note: `&usize` implements `Sub`
39   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
40    |
-    = note: `&usize` implements `Sub`
+    = note: `usize` implements `Sub<&usize>`
42    = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
43 
44 error[E0277]: cannot multiply `{integer}` by `()`


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

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

error[E0277]: cannot subtract `Option<{integer}>` from `usize`
##[error]  --> /checkout/tests/ui/mismatched_types/binops.rs:3:16
   |
LL |     2 as usize - Some(1); //~ ERROR cannot subtract `Option<{integer}>` from `usize`
   |                ^ no implementation for `usize - Option<{integer}>`
   |
   = help: the trait `Sub<Option<{integer}>>` is not implemented for `usize`
help: the following other types implement trait `Sub<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:212:8
   |
   = note: `usize` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:227:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&usize` implements `Sub<usize>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&usize` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `usize` implements `Sub<&usize>`
   = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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

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

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

error[E0277]: can't compare `{integer}` with `Result<{integer}, _>`
##[error]  --> /checkout/tests/ui/mismatched_types/binops.rs:7:7
   |
LL |     6 == Ok(1); //~ ERROR can't compare `{integer}` with `Result<{integer}, _>`
   |       ^^ no implementation for `{integer} == Result<{integer}, _>`
   |
   = help: the trait `PartialEq<Result<{integer}, _>>` is not implemented for `{integer}`
   = help: the following other types implement trait `PartialEq<Rhs>`:
             f128
             f16
             f32
             f64
             i128
---
---- [ui] tests/ui/mismatched_types/float-integer-subtraction-error-24352.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/mismatched_types/float-integer-subtraction-error-24352/float-integer-subtraction-error-24352.stderr`
diff of stderr:

17    = note: `&f64` implements `Sub<f64>`
18   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
19    |
-    = note: `f64` implements `Sub<&f64>`
+    = note: `&f64` implements `Sub`
21   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
22    |
-    = note: `&f64` implements `Sub`
+    = note: `f64` implements `Sub<&f64>`
24    = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
25 help: consider using a floating-point literal by writing it with `.0`
26    |


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args mismatched_types/float-integer-subtraction-error-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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/mismatched_types/float-integer-subtraction-error-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/mismatched_types/float-integer-subtraction-error-24352" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: cannot subtract `{integer}` from `f64`
##[error]  --> /checkout/tests/ui/mismatched_types/float-integer-subtraction-error-24352.rs:4:12
   |
LL |     1.0f64 - 1 //~ ERROR E0277
   |            ^ no implementation for `f64 - {integer}`
   |
   = help: the trait `Sub<{integer}>` is not implemented for `f64`
help: the following other types implement trait `Sub<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:212:8
   |
   = note: `f64` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:227:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Sub<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f64` implements `Sub<&f64>`
   = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
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`.
------------------------------------------

---- [ui] tests/ui/mismatched_types/float-integer-subtraction-error-24352.rs stdout end ----
---- [ui] tests/ui/never_type/issue-13352.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/never_type/issue-13352/issue-13352.stderr`
diff of stderr:

17    = note: `&usize` implements `Add<usize>`
18   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
19    |
-    = note: `usize` implements `Add<&usize>`
+    = note: `&usize` implements `Add`
21   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
22    |
-    = note: `&usize` implements `Add`
+    = note: `usize` implements `Add<&usize>`
24    = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
25 
26 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 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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/never_type/issue-13352" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: 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>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `usize` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&usize` implements `Add<usize>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&usize` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `usize` implements `Add<&usize>`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error

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

---- [ui] tests/ui/never_type/issue-13352.rs stdout end ----
---- [ui] tests/ui/numbers-arithmetic/not-suggest-float-literal.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/numbers-arithmetic/not-suggest-float-literal/not-suggest-float-literal.stderr`
diff of stderr:

17    = note: `&u8` implements `Add<u8>`
18   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
19    |
-    = note: `u8` implements `Add<&u8>`
+    = note: `&u8` implements `Add`
21   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
22    |
-    = note: `&u8` implements `Add`
+    = note: `u8` implements `Add<&u8>`
24    = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
25 
26 error[E0277]: cannot add `&str` to `f64`

42    = note: `&f64` implements `Add<f64>`
43   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
44    |
-    = note: `f64` implements `Add<&f64>`
+    = note: `&f64` implements `Add`
46   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
47    |
-    = note: `&f64` implements `Add`
+    = note: `f64` implements `Add<&f64>`
49    = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
50 
51 error[E0277]: cannot add `{integer}` to `f64`

67    = note: `&f64` implements `Add<f64>`
68   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
69    |
-    = note: `f64` implements `Add<&f64>`
+    = note: `&f64` implements `Add`
71   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
72    |
-    = note: `&f64` implements `Add`
+    = note: `f64` implements `Add<&f64>`
74    = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
75 
76 error[E0277]: cannot subtract `{float}` from `u8`

92    = note: `&u8` implements `Sub<u8>`
93   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
94    |
-    = note: `u8` implements `Sub<&u8>`
+    = note: `&u8` implements `Sub`
96   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
97    |
-    = note: `&u8` implements `Sub`
+    = note: `u8` implements `Sub<&u8>`
99    = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
100 
101 error[E0277]: cannot subtract `&str` from `f64`

117    = note: `&f64` implements `Sub<f64>`
118   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
119    |
-    = note: `f64` implements `Sub<&f64>`
+    = note: `&f64` implements `Sub`
121   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
122    |
-    = note: `&f64` implements `Sub`
+    = note: `f64` implements `Sub<&f64>`
124    = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
125 
126 error[E0277]: cannot subtract `{integer}` from `f64`

142    = note: `&f64` implements `Sub<f64>`
143   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
144    |
-    = note: `f64` implements `Sub<&f64>`
+    = note: `&f64` implements `Sub`
146   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
147    |
-    = note: `&f64` implements `Sub`
+    = note: `f64` implements `Sub<&f64>`
149    = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
150 
151 error[E0277]: cannot multiply `u8` by `{float}`

167    = note: `&u8` implements `Mul<u8>`
168   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
169    |
-    = note: `u8` implements `Mul<&u8>`
+    = note: `&u8` implements `Mul`
171   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
172    |
-    = note: `&u8` implements `Mul`
+    = note: `u8` implements `Mul<&u8>`
174    = note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
175 
176 error[E0277]: cannot multiply `f64` by `&str`

192    = note: `&f64` implements `Mul<f64>`
193   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
194    |
-    = note: `f64` implements `Mul<&f64>`
+    = note: `&f64` implements `Mul`
196   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
197    |
-    = note: `&f64` implements `Mul`
+    = note: `f64` implements `Mul<&f64>`
199    = note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
200 
201 error[E0277]: cannot multiply `f64` by `{integer}`

217    = note: `&f64` implements `Mul<f64>`
218   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
219    |
-    = note: `f64` implements `Mul<&f64>`
+    = note: `&f64` implements `Mul`
221   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
222    |
-    = note: `&f64` implements `Mul`
+    = note: `f64` implements `Mul<&f64>`
224    = note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
225 
226 error[E0277]: cannot divide `u8` by `{float}`

256    = note: `&f64` implements `Div<f64>`
257   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
258    |
-    = note: `f64` implements `Div<&f64>`
+    = note: `&f64` implements `Div`
260   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
261    |
-    = note: `&f64` implements `Div`
+    = note: `f64` implements `Div<&f64>`
263    = note: this error originates in the macro `div_impl_float` (in Nightly builds, run with -Z macro-backtrace for more info)
264 
265 error[E0277]: cannot divide `f64` by `{integer}`

281    = note: `&f64` implements `Div<f64>`
282   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
283    |
-    = note: `f64` implements `Div<&f64>`
+    = note: `&f64` implements `Div`
285   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
286    |
---
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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/numbers-arithmetic/not-suggest-float-literal" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: 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 following other types implement trait `Add<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `u8` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&u8` implements `Add<u8>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&u8` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `u8` implements `Add<&u8>`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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 following other types implement trait `Add<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `f64` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Add<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f64` implements `Add<&f64>`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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 following other types implement trait `Add<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `f64` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Add<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f64` implements `Add<&f64>`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: cannot subtract `{float}` from `u8`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs:15:7
   |
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 following other types implement trait `Sub<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:212:8
   |
   = note: `u8` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:227:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&u8` implements `Sub<u8>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&u8` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `u8` implements `Sub<&u8>`
   = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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 following other types implement trait `Sub<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:212:8
   |
   = note: `f64` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:227:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Sub<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f64` implements `Sub<&f64>`
   = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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 following other types implement trait `Sub<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:212:8
   |
   = note: `f64` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:227:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Sub<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f64` implements `Sub<&f64>`
   = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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 following other types implement trait `Mul<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:346:8
   |
   = note: `u8` implements `Mul`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:361:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&u8` implements `Mul<u8>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&u8` implements `Mul`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `u8` implements `Mul<&u8>`
   = note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: cannot multiply `f64` by `&str`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/not-suggest-float-literal.rs:32:7
   |
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 following other types implement trait `Mul<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:346:8
   |
   = note: `f64` implements `Mul`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:361:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Mul<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Mul`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f64` implements `Mul<&f64>`
   = note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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 following other types implement trait `Mul<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:346:8
   |
   = note: `f64` implements `Mul`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:361:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Mul<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Mul`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f64` implements `Mul<&f64>`
   = note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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 following other types implement trait `Div<Rhs>`:
             `&u8` implements `Div<u8>`
             `&u8` implements `Div`
             `u8` implements `Div<&u8>`
             `u8` implements `Div<NonZero<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>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:513:8
   |
   = note: `f64` implements `Div`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:526:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Div<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Div`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f64` implements `Div<&f64>`
   = note: this error originates in the macro `div_impl_float` (in Nightly builds, run with -Z macro-backtrace for more info)

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 following other types implement trait `Div<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:513:8
   |
   = note: `f64` implements `Div`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:526:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Div<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Div`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
---
---- [ui] tests/ui/numbers-arithmetic/suggest-float-literal.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/numbers-arithmetic/suggest-float-literal/suggest-float-literal.stderr`
diff of stderr:

17    = note: `&f32` implements `Add<f32>`
18   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
19    |
-    = note: `f32` implements `Add<&f32>`
+    = note: `&f32` implements `Add`
21   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
22    |
-    = note: `&f32` implements `Add`
+    = note: `f32` implements `Add<&f32>`
24    = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
25 help: consider using a floating-point literal by writing it with `.0`
26    |

46    = note: `&f64` implements `Add<f64>`
47   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
48    |
-    = note: `f64` implements `Add<&f64>`
+    = note: `&f64` implements `Add`
50   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
51    |
-    = note: `&f64` implements `Add`
+    = note: `f64` implements `Add<&f64>`
53    = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
54 help: consider using a floating-point literal by writing it with `.0`
55    |

75    = note: `&f32` implements `Sub<f32>`
76   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
77    |
-    = note: `f32` implements `Sub<&f32>`
+    = note: `&f32` implements `Sub`
79   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
80    |
-    = note: `&f32` implements `Sub`
+    = note: `f32` implements `Sub<&f32>`
82    = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
83 help: consider using a floating-point literal by writing it with `.0`
84    |

104    = note: `&f64` implements `Sub<f64>`
105   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
106    |
-    = note: `f64` implements `Sub<&f64>`
+    = note: `&f64` implements `Sub`
108   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
109    |
-    = note: `&f64` implements `Sub`
+    = note: `f64` implements `Sub<&f64>`
111    = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
112 help: consider using a floating-point literal by writing it with `.0`
113    |

133    = note: `&f32` implements `Mul<f32>`
134   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
135    |
-    = note: `f32` implements `Mul<&f32>`
+    = note: `&f32` implements `Mul`
137   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
138    |
-    = note: `&f32` implements `Mul`
+    = note: `f32` implements `Mul<&f32>`
140    = note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
141 help: consider using a floating-point literal by writing it with `.0`
142    |

162    = note: `&f64` implements `Mul<f64>`
163   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
164    |
-    = note: `f64` implements `Mul<&f64>`
+    = note: `&f64` implements `Mul`
166   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
167    |
-    = note: `&f64` implements `Mul`
+    = note: `f64` implements `Mul<&f64>`
169    = note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
170 help: consider using a floating-point literal by writing it with `.0`
171    |

191    = note: `&f32` implements `Div<f32>`
192   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
193    |
-    = note: `f32` implements `Div<&f32>`
+    = note: `&f32` implements `Div`
195   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
196    |
-    = note: `&f32` implements `Div`
+    = note: `f32` implements `Div<&f32>`
198    = note: this error originates in the macro `div_impl_float` (in Nightly builds, run with -Z macro-backtrace for more info)
199 help: consider using a floating-point literal by writing it with `.0`
200    |

220    = note: `&f64` implements `Div<f64>`
221   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
222    |
-    = note: `f64` implements `Div<&f64>`
+    = note: `&f64` implements `Div`
224   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
225    |
---
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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/numbers-arithmetic/suggest-float-literal" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: 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 following other types implement trait `Add<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `f32` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f32` implements `Add<f32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f32` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f32` implements `Add<&f32>`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
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 following other types implement trait `Add<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `f64` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Add<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f64` implements `Add<&f64>`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
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 following other types implement trait `Sub<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:212:8
   |
   = note: `f32` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:227:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f32` implements `Sub<f32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f32` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f32` implements `Sub<&f32>`
   = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
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 following other types implement trait `Sub<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:212:8
   |
   = note: `f64` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:227:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Sub<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Sub`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f64` implements `Sub<&f64>`
   = note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
   |
LL |     x - 100.0 //~ ERROR cannot subtract `{integer}` from `f64`
   |            ++

error[E0277]: cannot multiply `f32` by `{integer}`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/suggest-float-literal.rs:22:7
   |
LL |     x * 100 //~ ERROR cannot multiply `f32` by `{integer}`
   |       ^ no implementation for `f32 * {integer}`
   |
   = help: the trait `Mul<{integer}>` is not implemented for `f32`
help: the following other types implement trait `Mul<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:346:8
   |
   = note: `f32` implements `Mul`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:361:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f32` implements `Mul<f32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f32` implements `Mul`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f32` implements `Mul<&f32>`
   = note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
   |
LL |     x * 100.0 //~ ERROR cannot multiply `f32` by `{integer}`
   |            ++

error[E0277]: cannot multiply `f64` by `{integer}`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/suggest-float-literal.rs:26:7
   |
LL |     x * 100 //~ ERROR cannot multiply `f64` by `{integer}`
   |       ^ no implementation for `f64 * {integer}`
   |
   = help: the trait `Mul<{integer}>` is not implemented for `f64`
help: the following other types implement trait `Mul<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:346:8
   |
   = note: `f64` implements `Mul`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:361:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Mul<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Mul`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f64` implements `Mul<&f64>`
   = note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
   |
LL |     x * 100.0 //~ ERROR cannot multiply `f64` by `{integer}`
   |            ++

error[E0277]: cannot divide `f32` by `{integer}`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/suggest-float-literal.rs:30:7
   |
LL |     x / 100 //~ ERROR cannot divide `f32` by `{integer}`
   |       ^ no implementation for `f32 / {integer}`
   |
   = help: the trait `Div<{integer}>` is not implemented for `f32`
help: the following other types implement trait `Div<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:513:8
   |
   = note: `f32` implements `Div`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:526:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f32` implements `Div<f32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f32` implements `Div`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f32` implements `Div<&f32>`
   = note: this error originates in the macro `div_impl_float` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
   |
LL |     x / 100.0 //~ ERROR cannot divide `f32` by `{integer}`
   |            ++

error[E0277]: cannot divide `f64` by `{integer}`
##[error]  --> /checkout/tests/ui/numbers-arithmetic/suggest-float-literal.rs:34:7
   |
LL |     x / 100 //~ ERROR cannot divide `f64` by `{integer}`
   |       ^ no implementation for `f64 / {integer}`
   |
   = help: the trait `Div<{integer}>` is not implemented for `f64`
help: the following other types implement trait `Div<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:513:8
   |
   = note: `f64` implements `Div`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:526:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&f64` implements `Div<f64>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&f64` implements `Div`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `f64` implements `Div<&f64>`
   = note: this error originates in the macro `div_impl_float` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a floating-point literal by writing it with `.0`
   |
LL |     x / 100.0 //~ ERROR cannot divide `f64` by `{integer}`
   |            ++

error: aborting due to 8 previous errors

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

10 help: the following other types implement trait `Sum<A>`
11   --> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
12    |
-    = note: `i32` implements `Sum`
+    = note: `i32` implements `Sum<&i32>`
14   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
15    |
-    = note: `i32` implements `Sum<&i32>`
+    = note: `i32` implements `Sum`
17   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
18    |
19    = note: in this macro invocation

40 help: the following other types implement trait `Product<A>`
41   --> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
42    |
-    = note: `i32` implements `Product`
+    = note: `i32` implements `Product<&i32>`
44   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
45    |
-    = note: `i32` implements `Product<&i32>`
+    = note: `i32` implements `Product`
47   ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
48    |
49    = note: in this macro invocation


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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/on-unimplemented/sum" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `&()`
##[error]  --> /checkout/tests/ui/on-unimplemented/sum.rs:4:31
   |
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>`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:70:8
   |
   = note: `i32` implements `Sum<&i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:48:8
   |
   = note: `i32` implements `Sum`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:204:0
   |
   = note: in this macro invocation
note: the method call chain might not have had the expected associated types
  --> /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:3576:4
   = note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: a value of type `i32` cannot be made by multiplying all elements of type `&()` from an iterator
##[error]  --> /checkout/tests/ui/on-unimplemented/sum.rs:7:35
   |
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>`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:81:8
   |
   = note: `i32` implements `Product<&i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:59:8
   |
   = note: `i32` implements `Product`
  ::: /rustc/FAKE_PREFIX/library/core/src/iter/traits/accum.rs:204:0
   |
   = note: in this macro invocation
note: the method call chain might not have had the expected associated types
  --> /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:3608:4
   = note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
---
---- [ui] tests/ui/span/multiline-span-simple.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/span/multiline-span-simple/multiline-span-simple.stderr`
diff of stderr:

17    = note: `&u32` implements `Add<u32>`
18   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
19    |
-    = note: `u32` implements `Add<&u32>`
+    = note: `&u32` implements `Add`
21   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
22    |
-    = note: `&u32` implements `Add`
+    = note: `u32` implements `Add<&u32>`
24    = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
25 
26 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 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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/span/multiline-span-simple" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: 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 following other types implement trait `Add<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `u32` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&u32` implements `Add<u32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&u32` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `u32` implements `Add<&u32>`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error

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

---- [ui] tests/ui/span/multiline-span-simple.rs stdout end ----
---- [ui] tests/ui/type/type-check-defaults.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/type/type-check-defaults/type-check-defaults.stderr`
diff of stderr:

95    = note: `&i32` implements `Add<i32>`
96   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
97    |
-    = note: `i32` implements `Add<&i32>`
+    = note: `&i32` implements `Add`
99   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
100    |
-    = note: `&i32` implements `Add`
+    = note: `i32` implements `Add<&i32>`
102 note: required by a bound in `ProjectionPred`
103   --> $DIR/type-check-defaults.rs:24:66
104    |


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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/type/type-check-defaults" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: a value of type `i32` cannot be built from an iterator over elements of type `i32`
##[error]  --> /checkout/tests/ui/type/type-check-defaults.rs:6:23
   |
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);
   |                  ^^^^^^^^^^^^^^^ required by this bound in `Foo`

error[E0277]: a value of type `i32` cannot be built from an iterator over elements of type `i32`
##[error]  --> /checkout/tests/ui/type/type-check-defaults.rs:8:38
   |
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);
   |                  ^^^^^^^^^^^^^^^ required by this bound in `Foo`

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);
   |                 ^^^^ the trait `Copy` is not implemented for `String`
   |
note: required by a bound in `Bounds`
  --> /checkout/tests/ui/type/type-check-defaults.rs:11:17
   |
LL | struct Bounds<T:Copy=String>(T);
   |                 ^^^^ required by this bound in `Bounds`

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;
   |                                          ^^^^ the trait `Copy` is not implemented for `String`
   |
note: required by a bound in `WhereClause`
  --> /checkout/tests/ui/type/type-check-defaults.rs:14:42
   |
LL | struct WhereClause<T=String>(T) where T: Copy;
   |                                          ^^^^ required by this bound in `WhereClause`

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> {}
   |                    ^^^^ the trait `Copy` is not implemented for `String`
   |
note: required by a bound in `TraitBound`
  --> /checkout/tests/ui/type/type-check-defaults.rs:17:20
   |
LL | trait TraitBound<T:Copy=String> {}
   |                    ^^^^ required by this bound in `TraitBound`

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 following other types implement trait `Add<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `i32` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&i32` implements `Add<i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&i32` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `i32` implements `Add<&i32>`
note: required by a bound in `ProjectionPred`
  --> /checkout/tests/ui/type/type-check-defaults.rs:24:66
   |
LL | trait ProjectionPred<T:Iterator = IntoIter<i32>> where T::Item : Add<u8> {}
   |                                                                  ^^^^^^^ required by this bound in `ProjectionPred`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 7 previous errors

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

---- [ui] tests/ui/type/type-check-defaults.rs stdout end ----
---- [ui] tests/ui/typeck/issue-81293.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/typeck/issue-81293/issue-81293.stderr`
diff of stderr:

32    = note: `&usize` implements `Add<usize>`
33   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
34    |
-    = note: `usize` implements `Add<&usize>`
+    = note: `&usize` implements `Add`
36   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
37    |
-    = note: `&usize` implements `Add`
+    = note: `usize` implements `Add<&usize>`
39    = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
40 
41 error: aborting due to 3 previous errors


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args 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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/typeck/issue-81293" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/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;
   |            --- 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 following other types implement trait `Add<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `usize` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&usize` implements `Add<usize>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&usize` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `usize` implements `Add<&usize>`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

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

---- [ui] tests/ui/typeck/issue-81293.rs stdout end ----
---- [ui] tests/ui/ufcs/ufcs-qpath-self-mismatch.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/ufcs/ufcs-qpath-self-mismatch/ufcs-qpath-self-mismatch.stderr`
diff of stderr:

17    = note: `&i32` implements `Add<i32>`
18   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
19    |
-    = note: `i32` implements `Add<&i32>`
+    = note: `&i32` implements `Add`
21   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
22    |
-    = note: `&i32` implements `Add`
+    = note: `i32` implements `Add<&i32>`
24    = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
25 
26 error[E0308]: mismatched types

88    = note: `&i32` implements `Add<i32>`
89   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
90    |
-    = note: `i32` implements `Add<&i32>`
+    = note: `&i32` implements `Add`
92   ::: $SRC_DIR/core/src/internal_macros.rs:LL:COL
93    |
-    = note: `&i32` implements `Add`
+    = note: `i32` implements `Add<&i32>`
95    = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
96 
97 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 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/aarch64-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/ufcs/ufcs-qpath-self-mismatch" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: 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 following other types implement trait `Add<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `i32` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&i32` implements `Add<i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&i32` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `i32` implements `Add<&i32>`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

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
   |
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:92:7
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
   |
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:92:7
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 following other types implement trait `Add<Rhs>`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:99:8
   |
   = note: `i32` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/ops/arith.rs:114:0
   |
   = note: in this macro invocation
  --> /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:22:8
   |
   = note: `&i32` implements `Add<i32>`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:44:8
   |
   = note: `&i32` implements `Add`
  ::: /rustc/FAKE_PREFIX/library/core/src/internal_macros.rs:33:8
   |
   = note: `i32` implements `Add<&i32>`
   = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 4 previous errors

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants