Skip to content

Commit 96e976d

Browse files
authored
Merge pull request #69 from eddyb/patch-1
Statements do not have types.
2 parents 19c5719 + 6188cb1 commit 96e976d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/statements.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ declaration until the end of the enclosing block scope.
3737
## Expression statements
3838

3939
An _expression statement_ is one that evaluates an
40-
[expression](expressions.html) and ignores its result. The type of an
41-
expression statement `e;` is always `()`, regardless of the type of `e`. As a
42-
rule, an expression statement's purpose is to trigger the effects of evaluating
43-
its expression. An expression that consists of only a [block
40+
[expression](expressions.html) and ignores its result. As a rule, an expression
41+
statement's purpose is to trigger the effects of evaluating its expression.
42+
An expression that consists of only a [block
4443
expression](expressions.html#block-expressions) or control flow expression,
4544
that doesn't end a block and evaluates to `()` can also be used as an
4645
expression statement by omitting the trailing semicolon.

0 commit comments

Comments
 (0)