|
1 | 1 | error[E0277]: `()` doesn't implement `std::fmt::Display`
|
2 | 2 | --> $DIR/binding-assigned-block-without-tail-expression.rs:14:20
|
3 | 3 | |
|
| 4 | +LL | 42; |
| 5 | + | - help: remove this semicolon |
| 6 | +... |
4 | 7 | LL | println!("{}", x);
|
5 | 8 | | ^ `()` cannot be formatted with the default formatter
|
6 | 9 | |
|
7 | 10 | = help: the trait `std::fmt::Display` is not implemented for `()`
|
8 | 11 | = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
9 | 12 | = 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)
|
10 |
| -help: remove this semicolon |
11 |
| - | |
12 |
| -LL - 42; |
13 |
| -LL + 42 |
14 |
| - | |
15 | 13 |
|
16 | 14 | error[E0277]: `()` doesn't implement `std::fmt::Display`
|
17 | 15 | --> $DIR/binding-assigned-block-without-tail-expression.rs:15:20
|
18 | 16 | |
|
| 17 | +LL | let y = {}; |
| 18 | + | -- this empty block is missing a tail expression |
| 19 | +... |
19 | 20 | LL | println!("{}", y);
|
20 | 21 | | ^ `()` cannot be formatted with the default formatter
|
21 | 22 | |
|
22 |
| -help: this empty block is missing a tail expression |
23 |
| - --> $DIR/binding-assigned-block-without-tail-expression.rs:7:13 |
24 |
| - | |
25 |
| -LL | let y = {}; |
26 |
| - | ^^ |
27 | 23 | = help: the trait `std::fmt::Display` is not implemented for `()`
|
28 | 24 | = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
29 | 25 | = 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)
|
30 | 26 |
|
31 | 27 | error[E0277]: `()` doesn't implement `std::fmt::Display`
|
32 | 28 | --> $DIR/binding-assigned-block-without-tail-expression.rs:16:20
|
33 | 29 | |
|
| 30 | +LL | "hi"; |
| 31 | + | - help: remove this semicolon |
| 32 | +... |
34 | 33 | LL | println!("{}", z);
|
35 | 34 | | ^ `()` cannot be formatted with the default formatter
|
36 | 35 | |
|
37 | 36 | = help: the trait `std::fmt::Display` is not implemented for `()`
|
38 | 37 | = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
39 | 38 | = 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)
|
40 |
| -help: remove this semicolon |
41 |
| - | |
42 |
| -LL - "hi"; |
43 |
| -LL + "hi" |
44 |
| - | |
45 | 39 |
|
46 | 40 | error[E0277]: `()` doesn't implement `std::fmt::Display`
|
47 | 41 | --> $DIR/binding-assigned-block-without-tail-expression.rs:17:20
|
48 | 42 | |
|
49 |
| -LL | println!("{}", s); |
50 |
| - | ^ `()` cannot be formatted with the default formatter |
51 |
| - | |
52 |
| -help: this block is missing a tail expression |
53 |
| - --> $DIR/binding-assigned-block-without-tail-expression.rs:11:13 |
54 |
| - | |
55 | 43 | LL | let s = {
|
56 |
| - | _____________^ |
| 44 | + | _____________- |
57 | 45 | LL | | S;
|
58 | 46 | LL | | };
|
59 |
| - | |_____^ |
| 47 | + | |_____- this block is missing a tail expression |
| 48 | +... |
| 49 | +LL | println!("{}", s); |
| 50 | + | ^ `()` cannot be formatted with the default formatter |
| 51 | + | |
60 | 52 | = help: the trait `std::fmt::Display` is not implemented for `()`
|
61 | 53 | = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
62 | 54 | = 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)
|
63 | 55 |
|
64 | 56 | error[E0308]: mismatched types
|
65 | 57 | --> $DIR/binding-assigned-block-without-tail-expression.rs:18:18
|
66 | 58 | |
|
| 59 | +LL | 42; |
| 60 | + | - help: remove this semicolon |
| 61 | +... |
67 | 62 | LL | let _: i32 = x;
|
68 | 63 | | --- ^ expected `i32`, found `()`
|
69 | 64 | | |
|
70 | 65 | | expected due to this
|
71 |
| - | |
72 |
| -help: remove this semicolon |
73 |
| - | |
74 |
| -LL - 42; |
75 |
| -LL + 42 |
76 |
| - | |
77 | 66 |
|
78 | 67 | error[E0308]: mismatched types
|
79 | 68 | --> $DIR/binding-assigned-block-without-tail-expression.rs:19:18
|
80 | 69 | |
|
| 70 | +LL | let y = {}; |
| 71 | + | -- this empty block is missing a tail expression |
| 72 | +... |
81 | 73 | LL | let _: i32 = y;
|
82 | 74 | | --- ^ expected `i32`, found `()`
|
83 | 75 | | |
|
84 | 76 | | expected due to this
|
85 |
| - | |
86 |
| -help: this empty block is missing a tail expression |
87 |
| - --> $DIR/binding-assigned-block-without-tail-expression.rs:7:13 |
88 |
| - | |
89 |
| -LL | let y = {}; |
90 |
| - | ^^ |
91 | 77 |
|
92 | 78 | error[E0308]: mismatched types
|
93 | 79 | --> $DIR/binding-assigned-block-without-tail-expression.rs:20:18
|
94 | 80 | |
|
95 |
| -LL | let _: i32 = z; |
96 |
| - | --- ^ expected `i32`, found `()` |
97 |
| - | | |
98 |
| - | expected due to this |
99 |
| - | |
100 |
| -help: this block is missing a tail expression |
101 |
| - --> $DIR/binding-assigned-block-without-tail-expression.rs:8:13 |
102 |
| - | |
103 | 81 | LL | let z = {
|
104 |
| - | _____________^ |
| 82 | + | _____________- |
105 | 83 | LL | | "hi";
|
106 | 84 | LL | | };
|
107 |
| - | |_____^ |
| 85 | + | |_____- this block is missing a tail expression |
| 86 | +... |
| 87 | +LL | let _: i32 = z; |
| 88 | + | --- ^ expected `i32`, found `()` |
| 89 | + | | |
| 90 | + | expected due to this |
108 | 91 |
|
109 | 92 | error[E0308]: mismatched types
|
110 | 93 | --> $DIR/binding-assigned-block-without-tail-expression.rs:21:18
|
111 | 94 | |
|
112 |
| -LL | let _: i32 = s; |
113 |
| - | --- ^ expected `i32`, found `()` |
114 |
| - | | |
115 |
| - | expected due to this |
116 |
| - | |
117 |
| -help: this block is missing a tail expression |
118 |
| - --> $DIR/binding-assigned-block-without-tail-expression.rs:11:13 |
119 |
| - | |
120 | 95 | LL | let s = {
|
121 |
| - | _____________^ |
| 96 | + | _____________- |
122 | 97 | LL | | S;
|
123 | 98 | LL | | };
|
124 |
| - | |_____^ |
| 99 | + | |_____- this block is missing a tail expression |
| 100 | +... |
| 101 | +LL | let _: i32 = s; |
| 102 | + | --- ^ expected `i32`, found `()` |
| 103 | + | | |
| 104 | + | expected due to this |
125 | 105 |
|
126 | 106 | error: aborting due to 8 previous errors
|
127 | 107 |
|
|
0 commit comments