Expressions vs statements
- Expressions have a return value do NOT need a trailing semi-colon
- Statements do not have values and need a semi-colon
examples/other/statements/src/main.rs
fn main() { let x = 2; println!("{x}"); let y = { let a = 2; let b = 3; a + b // no semi-colon here! }; // there is a semi-colon here! println!("{y}"); }