Make (Some) Separators Optional

This is patently false. Rust accepts semicolons after many of the constructs that you list, and sometimes it requires them! (not at the parsing stage, but rather; the lack of a semicolon causes it to be type-checked against ())

fn main() {
    if true { 3 } else { 4 }; // <-- this semicolon is REQUIRED, else type error!
    let _ = 2;

    loop {
        break 2;
    }; // <-- this semicolon is REQUIRED, else type error!
    let _ = 2;
}

I'm not saying that the above is useful; but I dare not call rust's rules for semicolons intuitive or consistent!


Edit: Or then again, I did say it myself that ; is a statement. Maybe these are parsed as loop {...} (some sort of "expression statement"), ; (a statement), and let _ = 2; (a statement)?

3 Likes