You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Vector](#vector-types)-typed expressions can be indexed by writing a
1617
1601
square-bracket-enclosed expression (the index) after them. When the
1618
-
vector is mutable, the resulting _lval_ can be assigned to.
1602
+
vector is mutable, the resulting [lvalue](#lvalues-rvalues-and-temporaries) can be assigned to.
1619
1603
1620
1604
Indices are zero-based, and may be of any integral type. Vector access
1621
1605
is bounds-checked at run-time. When the check fails, it will put the
@@ -1641,7 +1625,7 @@ operators, before the expression they apply to.
1641
1625
`*`
1642
1626
: Dereference. When applied to a [box](#box-types) or
1643
1627
[resource](#resources) type, it accesses the inner value. For
1644
-
mutable boxes, the resulting _lval_ can be assigned to. For
1628
+
mutable boxes, the resulting [lvalue](#lvalues-rvalues-and-temporaries) can be assigned to. For
1645
1629
[enums](#enumerated-types) that have only a single variant,
1646
1630
containing a single parameter, the dereference operator accesses
1647
1631
this parameter.
@@ -1762,11 +1746,11 @@ types.
1762
1746
1763
1747
#### Binary move expressions
1764
1748
1765
-
A _binary move expression_ consists of an *lval* followed by a left-pointing
1766
-
arrow (`<-`) and an *rval* expression.
1749
+
A _binary move expression_ consists of an [lvalue](#lvalues-rvalues-and-temporaries) followed by a left-pointing
1750
+
arrow (`<-`) and an [rvalue](#lvalues-rvalues-and-temporaries) expression.
1767
1751
1768
-
Evaluating a move expression causes, as a side effect, the *rval* to be
1769
-
*moved* into the *lval*. If the *rval* was itself an *lval*, it must be a
1752
+
Evaluating a move expression causes, as a side effect, the rvalue to be
1753
+
*moved* into the lvalue. If the rvalue was itself an lvalue, it must be a
1770
1754
local variable, as it will be de-initialized in the process.
1771
1755
1772
1756
Evaluating a move expression does not change reference counts, nor does it
@@ -1792,17 +1776,13 @@ y.z <- c;
1792
1776
1793
1777
#### Swap expressions
1794
1778
1795
-
A _swap expression_ consists of an *lval* followed by a bi-directional arrow
1796
-
(`<->`) and another *lval* expression.
1779
+
A _swap expression_ consists of an [lvalue](#lvalues-rvalues-and-temporaries) followed by a bi-directional arrow (`<->`) and another [lvalue](#lvalues-rvalues-and-temporaries).
1797
1780
1798
-
Evaluating a swap expression causes, as a side effect, the values held in the
1799
-
left-hand-side and right-hand-side *lvals* to be exchanged indivisibly.
1781
+
Evaluating a swap expression causes, as a side effect, the values held in the left-hand-side and right-hand-side [lvalues](#lvalues-rvalues-and-temporaries) to be exchanged indivisibly.
1800
1782
1801
-
Evaluating a swap expression neither changes reference counts nor deeply
1802
-
copies any unique structure pointed to by the moved
1803
-
*rval*. Instead, the swap expression represents an indivisible *exchange of
1804
-
ownership* between the right-hand-side and the left-hand-side of the
1805
-
expression. No allocation or destruction is entailed.
1783
+
Evaluating a swap expression neither changes reference counts nor deeply copies any unique structure pointed to by the moved [rvalue](#lvalues-rvalues-and-temporaries).
1784
+
Instead, the swap expression represents an indivisible *exchange of ownership* between the right-hand-side and the left-hand-side of the expression.
1785
+
No allocation or destruction is entailed.
1806
1786
1807
1787
An example of three different swap expressions:
1808
1788
@@ -1821,8 +1801,8 @@ y.z <-> b.c;
1821
1801
1822
1802
#### Assignment expressions
1823
1803
1824
-
An _assignment expression_ consists of an *lval* expression followed by an
1825
-
equals sign (`=`) and an *rval* expression.
1804
+
An _assignment expression_ consists of an [lvalue](#lvalues-rvalues-and-temporaries) expression followed by an
1805
+
equals sign (`=`) and an [rvalue](#lvalues-rvalues-and-temporaries) expression.
1826
1806
1827
1807
Evaluating an assignment expression is equivalent to evaluating a [binary move
1828
1808
expression](#binary-move-expressions) applied to a [unary copy
0 commit comments