about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-01-06 02:49:15 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-01-06 04:37:29 +0000
commit031e0854509759ccf7dbc697bfd5d958adac83f7 (patch)
tree1775aea00a81b44d343be22791db871330390775 /src/test
parent1fa6ada9dd3a17fc8c99b6b559a2835946803d21 (diff)
downloadrust-031e0854509759ccf7dbc697bfd5d958adac83f7.tar.gz
rust-031e0854509759ccf7dbc697bfd5d958adac83f7.zip
Tweak output
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/type/binding-assigned-block-without-tail-expression.stderr90
1 files changed, 35 insertions, 55 deletions
diff --git a/src/test/ui/type/binding-assigned-block-without-tail-expression.stderr b/src/test/ui/type/binding-assigned-block-without-tail-expression.stderr
index 646c632517a..3e96d7f317b 100644
--- a/src/test/ui/type/binding-assigned-block-without-tail-expression.stderr
+++ b/src/test/ui/type/binding-assigned-block-without-tail-expression.stderr
@@ -1,29 +1,25 @@
 error[E0277]: `()` doesn't implement `std::fmt::Display`
   --> $DIR/binding-assigned-block-without-tail-expression.rs:14:20
    |
+LL |         42;
+   |           - help: remove this semicolon
+...
 LL |     println!("{}", x);
    |                    ^ `()` cannot be formatted with the default formatter
    |
    = help: the trait `std::fmt::Display` is not implemented for `()`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: remove this semicolon
-   |
-LL -         42;
-LL +         42
-   |
 
 error[E0277]: `()` doesn't implement `std::fmt::Display`
   --> $DIR/binding-assigned-block-without-tail-expression.rs:15:20
    |
+LL |     let y = {};
+   |             -- this empty block is missing a tail expression
+...
 LL |     println!("{}", y);
    |                    ^ `()` cannot be formatted with the default formatter
    |
-help: this empty block is missing a tail expression
-  --> $DIR/binding-assigned-block-without-tail-expression.rs:7:13
-   |
-LL |     let y = {};
-   |             ^^
    = help: the trait `std::fmt::Display` is not implemented for `()`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -31,32 +27,28 @@ LL |     let y = {};
 error[E0277]: `()` doesn't implement `std::fmt::Display`
   --> $DIR/binding-assigned-block-without-tail-expression.rs:16:20
    |
+LL |         "hi";
+   |             - help: remove this semicolon
+...
 LL |     println!("{}", z);
    |                    ^ `()` cannot be formatted with the default formatter
    |
    = help: the trait `std::fmt::Display` is not implemented for `()`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: remove this semicolon
-   |
-LL -         "hi";
-LL +         "hi"
-   |
 
 error[E0277]: `()` doesn't implement `std::fmt::Display`
   --> $DIR/binding-assigned-block-without-tail-expression.rs:17:20
    |
-LL |     println!("{}", s);
-   |                    ^ `()` cannot be formatted with the default formatter
-   |
-help: this block is missing a tail expression
-  --> $DIR/binding-assigned-block-without-tail-expression.rs:11:13
-   |
 LL |       let s = {
-   |  _____________^
+   |  _____________-
 LL | |         S;
 LL | |     };
-   | |_____^
+   | |_____- this block is missing a tail expression
+...
+LL |       println!("{}", s);
+   |                      ^ `()` cannot be formatted with the default formatter
+   |
    = help: the trait `std::fmt::Display` is not implemented for `()`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -64,64 +56,52 @@ LL | |     };
 error[E0308]: mismatched types
   --> $DIR/binding-assigned-block-without-tail-expression.rs:18:18
    |
+LL |         42;
+   |           - help: remove this semicolon
+...
 LL |     let _: i32 = x;
    |            ---   ^ expected `i32`, found `()`
    |            |
    |            expected due to this
-   |
-help: remove this semicolon
-   |
-LL -         42;
-LL +         42
-   |
 
 error[E0308]: mismatched types
   --> $DIR/binding-assigned-block-without-tail-expression.rs:19:18
    |
+LL |     let y = {};
+   |             -- this empty block is missing a tail expression
+...
 LL |     let _: i32 = y;
    |            ---   ^ expected `i32`, found `()`
    |            |
    |            expected due to this
-   |
-help: this empty block is missing a tail expression
-  --> $DIR/binding-assigned-block-without-tail-expression.rs:7:13
-   |
-LL |     let y = {};
-   |             ^^
 
 error[E0308]: mismatched types
   --> $DIR/binding-assigned-block-without-tail-expression.rs:20:18
    |
-LL |     let _: i32 = z;
-   |            ---   ^ expected `i32`, found `()`
-   |            |
-   |            expected due to this
-   |
-help: this block is missing a tail expression
-  --> $DIR/binding-assigned-block-without-tail-expression.rs:8:13
-   |
 LL |       let z = {
-   |  _____________^
+   |  _____________-
 LL | |         "hi";
 LL | |     };
-   | |_____^
+   | |_____- this block is missing a tail expression
+...
+LL |       let _: i32 = z;
+   |              ---   ^ expected `i32`, found `()`
+   |              |
+   |              expected due to this
 
 error[E0308]: mismatched types
   --> $DIR/binding-assigned-block-without-tail-expression.rs:21:18
    |
-LL |     let _: i32 = s;
-   |            ---   ^ expected `i32`, found `()`
-   |            |
-   |            expected due to this
-   |
-help: this block is missing a tail expression
-  --> $DIR/binding-assigned-block-without-tail-expression.rs:11:13
-   |
 LL |       let s = {
-   |  _____________^
+   |  _____________-
 LL | |         S;
 LL | |     };
-   | |_____^
+   | |_____- this block is missing a tail expression
+...
+LL |       let _: i32 = s;
+   |              ---   ^ expected `i32`, found `()`
+   |              |
+   |              expected due to this
 
 error: aborting due to 8 previous errors