@@ -1804,8 +1804,8 @@ otherwise exactly as a function item (with a minor additional cost of calling
1804
1804
the function, as such a call is indirect). @xref {Ref.Type.Fn }.
1805
1805
1806
1806
Every control path in a function ends with either a @code {ret } or @code {be }
1807
- statement . If a control path lacks a @code {ret } statement in source code, an
1808
- implicit @code {ret } statement is appended to the end of the control path
1807
+ expression . If a control path lacks a @code {ret } expression in source code, an
1808
+ implicit @code {ret } expression is appended to the end of the control path
1809
1809
during compilation, returning the implicit @code {() } value.
1810
1810
1811
1811
A function may have an @emph {effect }, which may be either @code {impure } or
@@ -1827,9 +1827,9 @@ fn add(int x, int y) -> int @{
1827
1827
@c * Ref.Item.Iter:: Items defining iterators.
1828
1828
1829
1829
@cindex Iterators
1830
- @cindex Put statement
1831
- @cindex Put each statement
1832
- @cindex Foreach statement
1830
+ @cindex Put expression
1831
+ @cindex Put each expression
1832
+ @cindex Foreach expression
1833
1833
1834
1834
Iterators are function-like items that can @code {put } multiple values during
1835
1835
their execution before returning or tail-calling.
@@ -1841,11 +1841,11 @@ but the iterator frame is only @emph{suspended} during the put, and will be
1841
1841
the caller's loop.
1842
1842
1843
1843
The output type of an iterator is the type of value that the function will
1844
- @code {put }, before it eventually executes a @code {ret } or @code {be } statement
1844
+ @code {put }, before it eventually evaluates a @code {ret } or @code {be } expression
1845
1845
of type @code {() } and completes its execution.
1846
1846
1847
1847
An iterator can only be called in the loop header of a matching @code {for
1848
- each } loop or as the argument in a @code {put each } statement .
1848
+ each } loop or as the argument in a @code {put each } expression .
1849
1849
@xref {Ref.Stmt.Foreach }.
1850
1850
1851
1851
An example of an iterator:
@@ -2052,13 +2052,13 @@ Rust; they cannot be used as user-defined identifiers in any context.
2052
2052
@cindex Any type
2053
2053
@cindex Dynamic type , see @i {Any type }
2054
2054
@cindex Reflection
2055
- @cindex Alt type statement
2055
+ @cindex Alt type expression
2056
2056
2057
2057
The type @code {any } is the union of all possible Rust types. A value of type
2058
2058
@code {any } is represented in memory as a pair consisting of a boxed value of
2059
2059
some non-@code {any } type @var {T } and a reflection of the type @var {T }.
2060
2060
2061
- Values of type @code {any } can be used in an @code {alt type } statement , in
2061
+ Values of type @code {any } can be used in an @code {alt type } expression , in
2062
2062
which the reflection is used to select a block corresponding to a particular
2063
2063
type extraction. @xref {Ref.Stmt.Alt }.
2064
2064
@@ -2549,7 +2549,7 @@ right hand side of copy statements, @xref{Ref.Stmt.Copy}.
2549
2549
@c * Ref.Stmt:: Executable statements.
2550
2550
@cindex Statements
2551
2551
2552
- A @dfn {statement } is a component of a block, which is in turn a components of
2552
+ A @dfn {statement } is a component of a block, which is in turn a component of
2553
2553
an outer block, a function or an iterator. When a function is spawned into a
2554
2554
task, the task @emph {executes } statements in an order determined by the body
2555
2555
of the enclosing structure. Each statement causes the task to perform certain
0 commit comments