@@ -49,7 +49,7 @@ the following lvalues may be moved out of:
4949* [ Variables] ( variables.html ) which are not currently borrowed.
5050* [ Temporary values] ( #temporary-lifetimes ) .
5151* [ Fields] ( #field-expressions ) of an lvalue which can be moved out of and
52- doesn't implement [ ` Drop ` ] ( # the-drop-trait) .
52+ doesn't implement [ ` Drop ` ] ( the-drop-trait.html ) .
5353* The result of [ dereferencing] ( #the-dereference-operator ) an expression with
5454 type ` Box<T> ` and that can also be moved out of.
5555
@@ -123,8 +123,8 @@ Here are some examples:
123123
124124Certain expressions will treat an expression as an lvalue by implicitly
125125borrowing it. For example, it is possible to compare two unsized
126- [ slices] ( #array-and-slice-types ) for equality directly, because the ` == `
127- operator implicitly borrows it's operands:
126+ [ slices] ( types.html #array-and-slice-types) for equality directly, because the
127+ ` == ` operator implicitly borrows it's operands:
128128
129129``` rust
130130# let c = [1 , 2 , 3 ];
@@ -155,17 +155,17 @@ Certain types of expressions can be evaluated at compile time. These are called
155155_ constant expressions_ . Certain places, such as in
156156[ constants] ( items.html#constant-items ) and [ statics] ( items.html#static-items ) ,
157157require a constant expression, and are always evaluated at compile time. In
158- other places, such as in [ ` let ` statements] ( let-statements ) , constant
159- expressions may be evaluated at compile time. If errors, such as out of bounds
160- [ array access] ( #index-expressions ) or [ overflow] ( #overflow ) occurs, then it is
161- a compiler error if the value must be evaluated at compile time, otherwise it
162- is just a warning, but the code will most likely panic when run.
158+ other places, such as in [ ` let ` statements] ( statements.html# let-statements) ,
159+ constant expressions may be evaluated at compile time. If errors, such as out
160+ of bounds [ array access] ( #index-expressions ) or [ overflow] ( #overflow ) occurs,
161+ then it is a compiler error if the value must be evaluated at compile time,
162+ otherwise it is just a warning, but the code will most likely panic when run.
163163
164164The following expressions are constant expressions, so long as any operands are
165165also constant expressions:
166166
167167* [ Literals] ( #literal-expressions ) .
168- * [ Paths] ( #paths ) to [ functions] ( items.html#functions ) and constants.
168+ * [ Paths] ( #path-expressions ) to [ functions] ( items.html#functions ) and constants.
169169 Recursively defining constants is not allowed.
170170* Paths to statics, so long as only their address, not their value, is used.
171171 This includes using their value indirectly through a compilicated expression.
@@ -190,7 +190,7 @@ also constant expressions:
190190 boolean] ( #lazy-boolean-operators ) operators used on integer and floating
191191 point types, ` bool ` and ` char ` .
192192* Shared [ borrow expressions] ( #borrow-operators ) .
193- * The [ dereference operator] ( #dereference-operator ) , but not to circumvent the
193+ * The [ dereference operator] ( #the- dereference-operator ) , but not to circumvent the
194194 rule on statics.
195195* [ Grouped expressions] ( #grouped-expressions ) .
196196* [ Cast expressions] ( #type-cast-expressions ) , except pointer to address and
@@ -223,7 +223,7 @@ A [path](paths.html) used as an expression context denotes either a local
223223variable or an item. Path expressions that resolve to local or static variables
224224are [ lvalues] ( expressions.html#lvalues-and-rvalues ) , other paths
225225are rvalues. Using a ` static mut ` variable requires an [ ` unsafe `
226- block] ( #unsafe-block ) .
226+ block] ( #unsafe-blocks ) .
227227
228228``` rust
229229# mod globals {
@@ -452,17 +452,17 @@ mystruct.method(); // Method expression
452452(mystruct.function_field)() // Call expression containing a field expression
453453```
454454
455- A field access is an [ lvalue] ( expressions.html# lvalues-and-rvalues)
456- referring to the value of that field. When the subexpression is
457- [ mutable ] ( #mutability ) , the field expression is also mutable.
455+ A field access is an [ lvalue] ( lvalues-and-rvalues ) referring to the value of
456+ that field. When the subexpression is [ mutable ] ( #mutability ) , the field
457+ expression is also mutable.
458458
459459Also, if the type of the expression to the left of the dot is a pointer, it is
460460automatically dereferenced as many times as necessary to make the field access
461461possible. In cases of ambiguity, we prefer fewer autoderefs to more.
462462
463463Finally the fields of a struct, a reference to a struct are treated as separate
464464entities when borrowing. If the struct does not implement
465- [ ` Drop ` ] ( # the-drop-trait) this also applies to moving out of each of its fields
465+ [ ` Drop ` ] ( the-drop-trait.html ) this also applies to moving out of each of its fields
466466where possible. This also does not apply if automatic dereferencing is done
467467though user defined types.
468468
0 commit comments