@@ -87,7 +87,7 @@ A *value expression* is an expression that represents an actual value.
87
87
The left operand of an [ assignment] [ assign ] or [ compound assignment] expression
88
88
is a place expression context, as is the single operand of a unary [ borrow] , and
89
89
the operand of any [ implicit borrow] . The discriminant or subject of a
90
- [ match expression] [ match ] and right side of a [ let statement] is also a place
90
+ [ match expression] [ match ] and right side of a [ let statement] [ let ] is also a place
91
91
expression context. All other expression contexts are value expression contexts.
92
92
93
93
> Note: Historically, place expressions were called * lvalues* and value
@@ -102,7 +102,7 @@ the remaining situations if that type is [`Sized`], then it may be possible to
102
102
move the value. Only the following place expressions may be moved out of:
103
103
104
104
* [ Variables] which are not currently borrowed.
105
- * [ Temporary values] ( #temporary-lifetimes ) .
105
+ * [ Temporary values] .
106
106
* [ Fields] [ field ] of a place expression which can be moved out of and
107
107
doesn't implement [ ` Drop ` ] .
108
108
* The result of [ dereferencing] an expression with type [ ` Box<T> ` ] and that can
@@ -145,9 +145,9 @@ of a value expression to a `'static` slot occurs when the expression could be
145
145
written in a constant, borrowed, and dereferencing that borrow where the
146
146
expression was the originally written, without changing the runtime behavior.
147
147
That is, the promoted expression can be evaluated at compile-time and the
148
- resulting value does not contain [ interior mutability] or [ destructors] (these
149
- properties are determined based on the value where possible, e.g. ` &None `
150
- always has the type ` &'static Option<_> ` , as it contains nothing disallowed).
148
+ resulting value does not contain [ interior mutability] or [ destructors] \ ( these
149
+ properties are determined based on the value where possible, e.g. ` &None ` always
150
+ has the type ` &'static Option<_> ` , as it contains nothing disallowed).
151
151
Otherwise, the lifetime of temporary values is typically
152
152
153
153
- the innermost enclosing statement; the tail expression of a block is
@@ -233,9 +233,9 @@ Implicit borrows may be taken in the following expressions:
233
233
234
234
Certain types of expressions can be evaluated at compile time. These are called
235
235
_ constant expressions_ . Certain places, such as in
236
- [ constants] ( items/constant-items.html ) and [ statics] ( items/ static-items.html ) ,
236
+ [ constants] and [ statics] (static variables ),
237
237
require a constant expression, and are always evaluated at compile time. In
238
- other places, such as in [ ` let ` statements] ( statements.html# let-statements ) ,
238
+ other places, such as in [ ` let ` statements] [ let ] ,
239
239
constant expressions may be evaluated at compile time. If errors, such as out
240
240
of bounds [ array indexing] or [ overflow] occurs,
241
241
then it is a compiler error if the value must be evaluated at compile time,
@@ -246,7 +246,7 @@ also constant expressions and do not cause any [`Drop::drop`][destructors] calls
246
246
to be ran.
247
247
248
248
* [ Literals] .
249
- * [ Paths] to [ functions] ( items/functions.html ) and constants.
249
+ * [ Paths] to [ functions] and constants.
250
250
Recursively defining constants is not allowed.
251
251
* [ Tuple expressions] .
252
252
* [ Array expressions] .
@@ -302,6 +302,8 @@ exist in `core::ops` and `core::cmp` with the same names.
302
302
[ negation ] : expressions/operator-expr.html#negation-operators
303
303
[ overflow ] : expressions/operator-expr.html#overflow
304
304
305
+ [ functions ] : items/functions.html
306
+ [ constants ] : items/constant-items.html
305
307
[ destructors ] : destructors.html
306
308
[ interior mutability ] : interior-mutability.html
307
309
[ `Box<T>` ] : ../std/boxed/struct.Box.html
@@ -311,7 +313,6 @@ exist in `core::ops` and `core::cmp` with the same names.
311
313
[ implicit borrow ] : #implicit-borrows
312
314
[ implicitly mutably borrowed ] : #implicit-borrows
313
315
[ let ] : statements.html#let-statements
314
- [ let statement ] : statements.html#let-statements
315
316
[ Mutable `static` items ] : items/static-items.html#mutable-statics
316
317
[ slice ] : types.html#array-and-slice-types
317
318
[ static variables ] : items/static-items.html
0 commit comments