Skip to content

Commit 2d84b48

Browse files
committed
Documentation only -- typos in section on swap expression
Closes #1595. Thanks to mikesamuel.
1 parent 4c4a5f7 commit 2d84b48

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/rust.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1679,13 +1679,13 @@ x.y <- c;
16791679
A _swap expression_ consists of an *lval* followed by a bi-directional arrow
16801680
(`<->`) and another *lval* expression.
16811681

1682-
Evaluating a swap expression causes, as a side effect, the vales held in the
1682+
Evaluating a swap expression causes, as a side effect, the values held in the
16831683
left-hand-side and right-hand-side *lvals* to be exchanged indivisibly.
16841684

1685-
Evaluating a move expression does not change reference counts, nor does it
1686-
cause a deep copy of any unique structure pointed to by the moved
1687-
*rval*. Instead, the move expression represents an indivisible *exchange of
1688-
ownership* between the right-hand-side to the left-hand-side of the
1685+
Evaluating a swap expression neither changes reference counts nor deeply
1686+
copies any unique structure pointed to by the moved
1687+
*rval*. Instead, the swap expression represents an indivisible *exchange of
1688+
ownership* between the right-hand-side and the left-hand-side of the
16891689
expression. No allocation or destruction is entailed.
16901690

16911691
An example of three different swap expressions:

0 commit comments

Comments
 (0)