-
Couldn't load subscription status.
- Fork 557
Open
Labels
C-bugIncorrect statements, terminology, or rendering issuesIncorrect statements, terminology, or rendering issues
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.
iampi31415
Metadata
Metadata
Assignees
Labels
C-bugIncorrect statements, terminology, or rendering issuesIncorrect statements, terminology, or rendering issues