@@ -1997,7 +1997,7 @@ On `struct`s:
1997
1997
list of names ` #[macro_use(foo, bar)] ` restricts the import to just those
1998
1998
macros named. The ` extern crate ` must appear at the crate root, not inside
1999
1999
` mod ` , which ensures proper function of the [ ` $crate ` macro
2000
- variable] ( book/macros.html#the-variable-$ crate ) .
2000
+ variable] ( book/macros.html#the-variable-crate ) .
2001
2001
2002
2002
- ` macro_reexport ` on an ` extern crate ` — re-export the named macros.
2003
2003
@@ -2007,7 +2007,7 @@ On `struct`s:
2007
2007
link it into the output.
2008
2008
2009
2009
See the [ macros section of the
2010
- book] ( book/macros.html#scoping-and-macro-import/export ) for more information on
2010
+ book] ( book/macros.html#scoping-and-macro-importexport ) for more information on
2011
2011
macro scope.
2012
2012
2013
2013
@@ -2586,7 +2586,7 @@ Here are some examples:
2586
2586
#### Moved and copied types
2587
2587
2588
2588
When a [ local variable] ( #variables ) is used as an
2589
- [ rvalue] ( #lvalues, -rvalues-and-temporaries ) , the variable will be copied
2589
+ [ rvalue] ( #lvalues-rvalues-and-temporaries ) , the variable will be copied
2590
2590
if its type implements ` Copy ` . All others are moved.
2591
2591
2592
2592
### Literal expressions
@@ -2605,7 +2605,7 @@ value, or the unit value.
2605
2605
### Path expressions
2606
2606
2607
2607
A [ path] ( #paths ) used as an expression context denotes either a local variable
2608
- or an item. Path expressions are [ lvalues] ( #lvalues, -rvalues-and-temporaries ) .
2608
+ or an item. Path expressions are [ lvalues] ( #lvalues-rvalues-and-temporaries ) .
2609
2609
2610
2610
### Tuple expressions
2611
2611
@@ -2718,7 +2718,7 @@ foo().x;
2718
2718
(Struct {a: 10, b: 20}).a;
2719
2719
```
2720
2720
2721
- A field access is an [ lvalue] ( #lvalues, -rvalues-and-temporaries ) referring to
2721
+ A field access is an [ lvalue] ( #lvalues-rvalues-and-temporaries ) referring to
2722
2722
the value of that field. When the type providing the field inherits mutability,
2723
2723
it can be [ assigned] ( #assignment-expressions ) to.
2724
2724
@@ -2729,7 +2729,7 @@ fewer autoderefs to more.
2729
2729
2730
2730
### Array expressions
2731
2731
2732
- An [ array] ( #array, -and-slice-types ) _ expression_ is written by enclosing zero
2732
+ An [ array] ( #array-and-slice-types ) _ expression_ is written by enclosing zero
2733
2733
or more comma-separated expressions of uniform type in square brackets.
2734
2734
2735
2735
In the ` [expr ';' expr] ` form, the expression after the ` ';' ` must be a
@@ -2745,9 +2745,9 @@ constant expression that can be evaluated at compile time, such as a
2745
2745
2746
2746
### Index expressions
2747
2747
2748
- [ Array] ( #array, -and-slice-types ) -typed expressions can be indexed by
2748
+ [ Array] ( #array-and-slice-types ) -typed expressions can be indexed by
2749
2749
writing a square-bracket-enclosed expression (the index) after them. When the
2750
- array is mutable, the resulting [ lvalue] ( #lvalues, -rvalues-and-temporaries ) can
2750
+ array is mutable, the resulting [ lvalue] ( #lvalues-rvalues-and-temporaries ) can
2751
2751
be assigned to.
2752
2752
2753
2753
Indices are zero-based, and may be of any integral type. Vector access is
@@ -2801,7 +2801,7 @@ before the expression they apply to.
2801
2801
* ` * `
2802
2802
: Dereference. When applied to a [ pointer] ( #pointer-types ) it denotes the
2803
2803
pointed-to location. For pointers to mutable locations, the resulting
2804
- [ lvalue] ( #lvalues, -rvalues-and-temporaries ) can be assigned to.
2804
+ [ lvalue] ( #lvalues-rvalues-and-temporaries ) can be assigned to.
2805
2805
On non-pointer types, it calls the ` deref ` method of the ` std::ops::Deref `
2806
2806
trait, or the ` deref_mut ` method of the ` std::ops::DerefMut ` trait (if
2807
2807
implemented by the type and required for an outer expression that will or
@@ -2942,8 +2942,8 @@ surprising side-effects on the dynamic execution semantics.
2942
2942
#### Assignment expressions
2943
2943
2944
2944
An _ assignment expression_ consists of an
2945
- [ lvalue] ( #lvalues, -rvalues-and-temporaries ) expression followed by an equals
2946
- sign (` = ` ) and an [ rvalue] ( #lvalues, -rvalues-and-temporaries ) expression.
2945
+ [ lvalue] ( #lvalues-rvalues-and-temporaries ) expression followed by an equals
2946
+ sign (` = ` ) and an [ rvalue] ( #lvalues-rvalues-and-temporaries ) expression.
2947
2947
2948
2948
Evaluating an assignment expression [ either copies or
2949
2949
moves] ( #moved-and-copied-types ) its right-hand operand to its left-hand
@@ -3170,7 +3170,7 @@ stands for a *single* data field, whereas a wildcard `..` stands for *all* the
3170
3170
fields of a particular variant.
3171
3171
3172
3172
A ` match ` behaves differently depending on whether or not the head expression
3173
- is an [ lvalue or an rvalue] ( #lvalues, -rvalues-and-temporaries ) . If the head
3173
+ is an [ lvalue or an rvalue] ( #lvalues-rvalues-and-temporaries ) . If the head
3174
3174
expression is an rvalue, it is first evaluated into a temporary location, and
3175
3175
the resulting value is sequentially compared to the patterns in the arms until
3176
3176
a match is found. The first arm with a matching pattern is chosen as the branch
@@ -3489,7 +3489,7 @@ enclosing `enum` or `struct` type itself. Such recursion has restrictions:
3489
3489
3490
3490
* Recursive types must include a nominal type in the recursion
3491
3491
(not mere [ type definitions] ( grammar.html#type-definitions ) ,
3492
- or other structural types such as [ arrays] ( #array, -and-slice-types ) or [ tuples] ( #tuple-types ) ).
3492
+ or other structural types such as [ arrays] ( #array-and-slice-types ) or [ tuples] ( #tuple-types ) ).
3493
3493
* A recursive ` enum ` item must have at least one non-recursive constructor
3494
3494
(in order to give the recursion a basis case).
3495
3495
* The size of a recursive type must be finite;
0 commit comments