]> git.lizzy.rs Git - rust.git/blob - tests/ui/type/binding-assigned-block-without-tail-expression.stderr
Make `output_filenames` a real query
[rust.git] / tests / ui / type / binding-assigned-block-without-tail-expression.stderr
1 error[E0277]: `()` doesn't implement `std::fmt::Display`
2   --> $DIR/binding-assigned-block-without-tail-expression.rs:14:20
3    |
4 LL |         42;
5    |           - help: remove this semicolon
6 ...
7 LL |     println!("{}", x);
8    |                    ^ `()` cannot be formatted with the default formatter
9    |
10    = help: the trait `std::fmt::Display` is not implemented for `()`
11    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
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)
13
14 error[E0277]: `()` doesn't implement `std::fmt::Display`
15   --> $DIR/binding-assigned-block-without-tail-expression.rs:15:20
16    |
17 LL |     let y = {};
18    |             -- this empty block is missing a tail expression
19 ...
20 LL |     println!("{}", y);
21    |                    ^ `()` cannot be formatted with the default formatter
22    |
23    = help: the trait `std::fmt::Display` is not implemented for `()`
24    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
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)
26
27 error[E0277]: `()` doesn't implement `std::fmt::Display`
28   --> $DIR/binding-assigned-block-without-tail-expression.rs:16:20
29    |
30 LL |         "hi";
31    |             - help: remove this semicolon
32 ...
33 LL |     println!("{}", z);
34    |                    ^ `()` cannot be formatted with the default formatter
35    |
36    = help: the trait `std::fmt::Display` is not implemented for `()`
37    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
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)
39
40 error[E0277]: `()` doesn't implement `std::fmt::Display`
41   --> $DIR/binding-assigned-block-without-tail-expression.rs:17:20
42    |
43 LL |       let s = {
44    |  _____________-
45 LL | |         S;
46 LL | |     };
47    | |_____- this block is missing a tail expression
48 ...
49 LL |       println!("{}", s);
50    |                      ^ `()` cannot be formatted with the default formatter
51    |
52    = help: the trait `std::fmt::Display` is not implemented for `()`
53    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
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)
55
56 error[E0308]: mismatched types
57   --> $DIR/binding-assigned-block-without-tail-expression.rs:18:18
58    |
59 LL |         42;
60    |           - help: remove this semicolon
61 ...
62 LL |     let _: i32 = x;
63    |            ---   ^ expected `i32`, found `()`
64    |            |
65    |            expected due to this
66
67 error[E0308]: mismatched types
68   --> $DIR/binding-assigned-block-without-tail-expression.rs:19:18
69    |
70 LL |     let y = {};
71    |             -- this empty block is missing a tail expression
72 ...
73 LL |     let _: i32 = y;
74    |            ---   ^ expected `i32`, found `()`
75    |            |
76    |            expected due to this
77
78 error[E0308]: mismatched types
79   --> $DIR/binding-assigned-block-without-tail-expression.rs:20:18
80    |
81 LL |       let z = {
82    |  _____________-
83 LL | |         "hi";
84 LL | |     };
85    | |_____- this block is missing a tail expression
86 ...
87 LL |       let _: i32 = z;
88    |              ---   ^ expected `i32`, found `()`
89    |              |
90    |              expected due to this
91
92 error[E0308]: mismatched types
93   --> $DIR/binding-assigned-block-without-tail-expression.rs:21:18
94    |
95 LL |       let s = {
96    |  _____________-
97 LL | |         S;
98 LL | |     };
99    | |_____- this block is missing a tail expression
100 ...
101 LL |       let _: i32 = s;
102    |              ---   ^ expected `i32`, found `()`
103    |              |
104    |              expected due to this
105
106 error: aborting due to 8 previous errors
107
108 Some errors have detailed explanations: E0277, E0308.
109 For more information about an error, try `rustc --explain E0277`.