由于在 Rust 中分号显然是可选的,那么,如果我这样做:
fn fn1() -> i32 {
let a = 1
let b = 2
3
}
我遇到了这个错误:
error: expected one of `.`, `;`, `?`, or an operator, found `let`
--> src/main.rs:3:9
|
2 | let a = 1
| - expected one of `.`, `;`, `?`, or an operator here
3 | let b = 2
| ^^^ unexpected token