Closed as not planned
Description
Currently this compiles:
fn foo() -> i32 {
{3}
}
According to https://doc.rust-lang.org/nightly/reference/expressions/block-expr.html , the {3} part cannot be parsed as tail expression, since it's not ExpressionWithoutBlock
. If it is parsed as Statement
, then there should be a compile error, because its type is not ()
and the semicolon could not be not eliminated.