Skip to content

Commit

Permalink
One line one sentence the statements and expressions chapter.
Browse files Browse the repository at this point in the history
  • Loading branch information
isHavvy committed Oct 1, 2022
1 parent da903cf commit ce87f5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
9 changes: 0 additions & 9 deletions src/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,6 @@ assert_eq!(

> **Note**: Since this is applied recursively, these expressions are also evaluated from innermost to outermost, ignoring siblings until there are no inner subexpressions.
## Early Termination

Expressions may be *terminated* early, whether by a jump expression or unwinding.
When terminated, evaluation of the expression stops.
If the expression is the target of termination by a jump expression, then it evaluates to the value specified by the jump expression.
Otherwise, it evaluates to the never type.

**Note**: Destructors are still executed for the expression after being terminated.

## Place Expressions and Value Expressions

Expressions are divided into two main categories: place expressions and value expressions;
Expand Down
12 changes: 4 additions & 8 deletions src/statements-and-expressions.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# Statements and expressions

Rust is _primarily_ an expression language. This means that most forms of
value-producing or effect-causing evaluation are directed by the uniform syntax
category of _expressions_. Each kind of expression can typically _nest_ within
each other kind of expression, and rules for evaluation of expressions involve
specifying both the value produced by the expression and the order in which its
sub-expressions are themselves evaluated.
Rust is _primarily_ an expression language.
This means that most forms of value-producing or effect-causing evaluation are directed by the uniform syntax category of _expressions_.
Each kind of expression can typically _nest_ within each other kind of expression, and rules for evaluation of expressions involve specifying both the value produced by the expression and the order in which its sub-expressions are themselves evaluated.

In contrast, statements serve _mostly_ to contain and explicitly
sequence expression evaluation.
In contrast, statements serve _mostly_ to contain and explicitly sequence expression evaluation.

0 comments on commit ce87f5f

Please sign in to comment.