>>455 Note: As a control flow expression, if a block expression is the outer expression of an expression statement, the expected type is () unless it is followed immediately by a semicolon. https://doc.rust-lang.org/reference/expressions/block-expr.html
An expression that consists of only a block expression or control flow expression, if used in a context where a statement is permitted, can omit the trailing semicolon. This can cause an ambiguity between it being parsed as a standalone statement and as a part of another expression; in this case, it is parsed as a statement. The type of ExpressionWithBlock expressions when used as statements must be the unit type.
When the trailing semicolon is omitted, the result must be type (). https://doc.rust-lang.org/reference/statements.html#expression-statements