mirror of https://github.com/rust-lang/reference
One line one sentence the statements and expressions chapter.
This commit is contained in:
parent
e076c6ed0c
commit
45c47cd386
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue