Open
Description
The reference currently states
The type of a block is the type of the final expression, or
()
if the final expression is omitted.
However, the type of this block appears to be !
:
{
loop {}
5;
}
whereas the type of this block is i32
{
loop {}
5
}
So it looks like the presence of an expression of type !
changes the default type of the block from ()
to !
.
As a side note, the doucmentation could also make clearer that "omitting the final expression" essentially means terminating the block with a semicolon.