]> git.proxmox.com Git - rustc.git/blob - src/doc/book/listings/ch03-common-programming-concepts/no-listing-19-statements-vs-expressions/output.txt
New upstream version 1.67.1+dfsg1
[rustc.git] / src / doc / book / listings / ch03-common-programming-concepts / no-listing-19-statements-vs-expressions / output.txt
1 $ cargo run
2 Compiling functions v0.1.0 (file:///projects/functions)
3 error: expected expression, found `let` statement
4 --> src/main.rs:2:14
5 |
6 2 | let x = (let y = 6);
7 | ^^^
8
9 error: expected expression, found statement (`let`)
10 --> src/main.rs:2:14
11 |
12 2 | let x = (let y = 6);
13 | ^^^^^^^^^
14 |
15 = note: variable declaration using `let` is a statement
16
17 error[E0658]: `let` expressions in this position are unstable
18 --> src/main.rs:2:14
19 |
20 2 | let x = (let y = 6);
21 | ^^^^^^^^^
22 |
23 = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
24
25 warning: unnecessary parentheses around assigned value
26 --> src/main.rs:2:13
27 |
28 2 | let x = (let y = 6);
29 | ^ ^
30 |
31 = note: `#[warn(unused_parens)]` on by default
32 help: remove these parentheses
33 |
34 2 - let x = (let y = 6);
35 2 + let x = let y = 6;
36 |
37
38 For more information about this error, try `rustc --explain E0658`.
39 warning: `functions` (bin "functions") generated 1 warning
40 error: could not compile `functions` due to 3 previous errors; 1 warning emitted