2022-02-06 16:43:51 +08:00
|
|
|
$ cargo run
|
|
|
|
Compiling functions v0.1.0 (file:///projects/functions)
|
2023-01-16 17:34:52 +08:00
|
|
|
error: expected expression, found `let` statement
|
|
|
|
--> src/main.rs:2:14
|
|
|
|
|
|
|
|
|
2 | let x = (let y = 6);
|
|
|
|
| ^^^
|
2022-02-06 16:43:51 +08:00
|
|
|
|
|
2024-06-06 21:23:21 +08:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-02-06 16:43:51 +08:00
|
|
|
|
|
|
|
warning: unnecessary parentheses around assigned value
|
|
|
|
--> src/main.rs:2:13
|
|
|
|
|
|
|
|
|
2 | let x = (let y = 6);
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
= note: `#[warn(unused_parens)]` on by default
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
2 - let x = (let y = 6);
|
|
|
|
2 + let x = let y = 6;
|
2023-01-16 17:34:52 +08:00
|
|
|
|
|
2022-02-06 16:43:51 +08:00
|
|
|
|
|
|
|
warning: `functions` (bin "functions") generated 1 warning
|
2024-06-06 21:23:21 +08:00
|
|
|
error: could not compile `functions` (bin "functions") due to 1 previous error; 1 warning emitted
|