Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ ExpressionWithBlock ->
```

r[expr.intro]
An expression may have two roles: it always produces a *value*, and it may have *effects* (otherwise known as "side effects").
An expression may have two roles: it produces a *value*, and it may have *effects* (otherwise known as "side effects").

r[expr.evaluation]
An expression *evaluates to* a value, and has effects during *evaluation*.

> [!NOTE]
> Some expressions _do not_ produce a value; however, they are exceptions rather than the rule. Examples that do not produce a value are: [`return`][expr.return], [`continue`][expr.loop.continue], [`break`][expr.loop.break] and [`loop`][expr.loop.infinite]. They do have a type, the [never type][Never Type] denoted `!`.

r[expr.operands]
Many expressions contain sub-expressions, called the *operands* of the expression.

Expand Down Expand Up @@ -333,6 +336,7 @@ They are never allowed before:
[match]: expressions/match-expr.md
[method-call]: expressions/method-call-expr.md
[Mutable `static` items]: items/static-items.md#mutable-statics
[Never type]: types/never.html
[Outer attributes]: attributes.md
[paths]: expressions/path-expr.md
[promoted]: destructors.md#constant-promotion
Expand Down