@@ -2539,7 +2539,7 @@ A temporary's lifetime equals the largest lifetime of any reference that points
25392539#### Moved and copied types
25402540
25412541When a [ local variable] ( #memory-slots ) is used
2542- as an [ rvalue] ( #lvalues-rvalues-and-temporaries )
2542+ as an [ rvalue] ( #lvalues, -rvalues-and-temporaries )
25432543the variable will either be moved or copied, depending on its type.
25442544For types that contain [ owning pointers] ( #pointer-types )
25452545or values that implement the special trait ` Drop ` ,
@@ -2562,7 +2562,7 @@ string, boolean value, or the unit value.
25622562### Path expressions
25632563
25642564A [ path] ( #paths ) used as an expression context denotes either a local variable or an item.
2565- Path expressions are [ lvalues] ( #lvalues-rvalues-and-temporaries ) .
2565+ Path expressions are [ lvalues] ( #lvalues, -rvalues-and-temporaries ) .
25662566
25672567### Tuple expressions
25682568
@@ -2675,7 +2675,7 @@ foo().x;
26752675(Struct {a: 10, b: 20}).a;
26762676~~~~
26772677
2678- A field access is an [ lvalue] ( #lvalues-rvalues-and-temporaries ) referring to the value of that field.
2678+ A field access is an [ lvalue] ( #lvalues, -rvalues-and-temporaries ) referring to the value of that field.
26792679When the type providing the field inherits mutabilty, it can be [ assigned] ( #assignment-expressions ) to.
26802680
26812681Also, if the type of the expression to the left of the dot is a pointer,
@@ -2711,7 +2711,7 @@ idx_expr : expr '[' expr ']' ;
27112711
27122712[ Vector] ( #vector-types ) -typed expressions can be indexed by writing a
27132713square-bracket-enclosed expression (the index) after them. When the
2714- vector is mutable, the resulting [ lvalue] ( #lvalues-rvalues-and-temporaries ) can be assigned to.
2714+ vector is mutable, the resulting [ lvalue] ( #lvalues, -rvalues-and-temporaries ) can be assigned to.
27152715
27162716Indices are zero-based, and may be of any integral type. Vector access
27172717is bounds-checked at run-time. When the check fails, it will put the
@@ -2737,7 +2737,7 @@ before the expression they apply to.
27372737 : Negation. May only be applied to numeric types.
27382738* ` * `
27392739 : Dereference. When applied to a [ pointer] ( #pointer-types ) it denotes the pointed-to location.
2740- For pointers to mutable locations, the resulting [ lvalue] ( #lvalues-rvalues-and-temporaries ) can be assigned to.
2740+ For pointers to mutable locations, the resulting [ lvalue] ( #lvalues, -rvalues-and-temporaries ) can be assigned to.
27412741 On non-pointer types, it calls the ` deref ` method of the ` std::ops::Deref ` trait, or the
27422742 ` deref_mut ` method of the ` std::ops::DerefMut ` trait (if implemented by the type and required
27432743 for an outer expression that will or could mutate the dereference), and produces the
@@ -2872,8 +2872,8 @@ fn avg(v: &[f64]) -> f64 {
28722872
28732873#### Assignment expressions
28742874
2875- An _ assignment expression_ consists of an [ lvalue] ( #lvalues-rvalues-and-temporaries ) expression followed by an
2876- equals sign (` = ` ) and an [ rvalue] ( #lvalues-rvalues-and-temporaries ) expression.
2875+ An _ assignment expression_ consists of an [ lvalue] ( #lvalues, -rvalues-and-temporaries ) expression followed by an
2876+ equals sign (` = ` ) and an [ rvalue] ( #lvalues, -rvalues-and-temporaries ) expression.
28772877
28782878Evaluating an assignment expression [ either copies or moves] ( #moved-and-copied-types ) its right-hand operand to its left-hand operand.
28792879
@@ -3186,7 +3186,7 @@ fn main() {
31863186~~~~
31873187
31883188A ` match ` behaves differently depending on whether or not the head expression
3189- is an [ lvalue or an rvalue] ( #lvalues-rvalues-and-temporaries ) .
3189+ is an [ lvalue or an rvalue] ( #lvalues, -rvalues-and-temporaries ) .
31903190If the head expression is an rvalue, it is
31913191first evaluated into a temporary location, and the resulting value
31923192is sequentially compared to the patterns in the arms until a match
@@ -3550,7 +3550,7 @@ There are four varieties of pointer in Rust:
35503550 : These point to memory _ owned by some other value_ .
35513551 References arise by (automatic) conversion from owning pointers, managed pointers,
35523552 or by applying the borrowing operator ` & ` to some other value,
3553- including [ lvalues, rvalues or temporaries] ( #lvalues-rvalues-and-temporaries ) .
3553+ including [ lvalues, rvalues or temporaries] ( #lvalues, -rvalues-and-temporaries ) .
35543554 References are written ` &content ` , or in some cases ` &'f content ` for some lifetime-variable ` f ` ,
35553555 for example ` &int ` means a reference to an integer.
35563556 Copying a reference is a "shallow" operation:
@@ -3852,7 +3852,7 @@ references to any boxes; the remainder of its heap is immediately freed.
38523852A task's stack contains slots.
38533853
38543854A _ slot_ is a component of a stack frame, either a function parameter,
3855- a [ temporary] ( #lvalues-rvalues-and-temporaries ) , or a local variable.
3855+ a [ temporary] ( #lvalues, -rvalues-and-temporaries ) , or a local variable.
38563856
38573857A _ local variable_ (or * stack-local* allocation) holds a value directly,
38583858allocated within the stack's memory. The value is a part of the stack frame.
0 commit comments