|
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 | | -... |
7 | 4 | LL | println!("{}", x); |
8 | 5 | | -- ^ `()` cannot be formatted with the default formatter |
9 | 6 | | | |
10 | 7 | | required by a bound introduced by this call |
11 | 8 | | |
12 | 9 | = help: the trait `std::fmt::Display` is not implemented for `()` |
13 | 10 | = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead |
| 11 | +note: required by a bound in `core::fmt::rt::Argument::<'_>::new_display` |
| 12 | + --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL |
14 | 13 |
|
15 | 14 | error[E0277]: `()` doesn't implement `std::fmt::Display` |
16 | 15 | --> $DIR/binding-assigned-block-without-tail-expression.rs:15:20 |
17 | 16 | | |
18 | | -LL | let y = {}; |
19 | | - | -- this empty block is missing a tail expression |
20 | | -... |
21 | 17 | LL | println!("{}", y); |
22 | 18 | | -- ^ `()` cannot be formatted with the default formatter |
23 | 19 | | | |
24 | 20 | | required by a bound introduced by this call |
25 | 21 | | |
26 | 22 | = help: the trait `std::fmt::Display` is not implemented for `()` |
27 | 23 | = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead |
| 24 | +note: required by a bound in `core::fmt::rt::Argument::<'_>::new_display` |
| 25 | + --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL |
28 | 26 |
|
29 | 27 | error[E0277]: `()` doesn't implement `std::fmt::Display` |
30 | 28 | --> $DIR/binding-assigned-block-without-tail-expression.rs:16:20 |
31 | 29 | | |
32 | | -LL | "hi"; |
33 | | - | - help: remove this semicolon |
34 | | -... |
35 | 30 | LL | println!("{}", z); |
36 | 31 | | -- ^ `()` cannot be formatted with the default formatter |
37 | 32 | | | |
38 | 33 | | required by a bound introduced by this call |
39 | 34 | | |
40 | 35 | = help: the trait `std::fmt::Display` is not implemented for `()` |
41 | 36 | = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead |
| 37 | +note: required by a bound in `core::fmt::rt::Argument::<'_>::new_display` |
| 38 | + --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL |
42 | 39 |
|
43 | 40 | error[E0277]: `()` doesn't implement `std::fmt::Display` |
44 | 41 | --> $DIR/binding-assigned-block-without-tail-expression.rs:17:20 |
45 | 42 | | |
46 | | -LL | let s = { |
47 | | - | _____________- |
48 | | -LL | | S; |
49 | | -LL | | }; |
50 | | - | |_____- this block is missing a tail expression |
51 | | -... |
52 | 43 | LL | println!("{}", s); |
53 | 44 | | -- ^ `()` cannot be formatted with the default formatter |
54 | 45 | | | |
55 | 46 | | required by a bound introduced by this call |
56 | 47 | | |
57 | 48 | = help: the trait `std::fmt::Display` is not implemented for `()` |
58 | 49 | = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead |
| 50 | +note: required by a bound in `core::fmt::rt::Argument::<'_>::new_display` |
| 51 | + --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL |
59 | 52 |
|
60 | 53 | error[E0308]: mismatched types |
61 | 54 | --> $DIR/binding-assigned-block-without-tail-expression.rs:18:18 |
|
0 commit comments