Skip to content

Commit 484995d

Browse files
committed
Fix links and sentence structure
1 parent 5836a69 commit 484995d

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

src/destructors.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ scope of the initializer expression is extended.
273273

274274
#### Extending based on expressions
275275

276-
For a let statement with an initializer, an *extending expression* if it is
276+
For a let statement with an initializer, an *extending expression* is an
277+
expression which is one of the following:
277278

278279
* The initializer expression.
279280
* The operand of a extending [borrow expression].
@@ -337,8 +338,9 @@ variable or field from being dropped automatically.
337338
[initialized]: glossary.html#initialized
338339
[interior mutability]: interior-mutability.html
339340
[lazy boolean expression]: expressions/operator-expr.html#lazy-boolean-operators
341+
[place context]: expressions.html#place-expressions-and-value-expressions
340342
[statement]: statements.html
341-
[temporary]: expressions.html#temporary-lifetimes
343+
[temporary]: expressions.html#temporaries
342344
[variable]: variables.html
343345

344346
[array]: types/array.html

src/expressions.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ the remaining situations if that type is [`Sized`], then it may be possible to
116116
move the value. Only the following place expressions may be moved out of:
117117

118118
* [Variables] which are not currently borrowed.
119-
* [Temporary values](#temporary-lifetimes).
119+
* [Temporary values](#temporaries).
120120
* [Fields][field] of a place expression which can be moved out of and
121121
doesn't implement [`Drop`].
122122
* The result of [dereferencing] an expression with type [`Box<T>`] and that can
@@ -154,9 +154,8 @@ The following expressions can be mutable place expression contexts:
154154

155155
When using a value expression in most place expression contexts, a temporary
156156
unnamed memory location is created initialized to that value and the expression
157-
evaluates to that location instead, except if [promoted](#constant-promotion)
158-
to a `static`. The [drop scope] of the temporary is usually the end of the
159-
enclosing statement.
157+
evaluates to that location instead, except if [promoted] to a `static`. The
158+
[drop scope] of the temporary is usually the end of the enclosing statement.
160159

161160
### Implicit Borrows
162161

@@ -249,10 +248,11 @@ They are never allowed before:
249248
[interior mutability]: interior-mutability.html
250249
[let statement]: statements.html#let-statements
251250
[Mutable `static` items]: items/static-items.html#mutable-statics
251+
[promoted]: destructors.html#constant-promotion
252252
[slice]: types/slice.html
253253
[statement]: statements.html
254254
[static variables]: items/static-items.html
255-
[Temporary values]: #temporary-lifetimes
255+
[Temporary values]: #temporaries
256256
[Variables]: variables.html
257257

258258
[_ArithmeticOrLogicalExpression_]: expressions/operator-expr.html#arithmetic-and-logical-binary-operators

src/expressions/loop-expr.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ and the `loop` must have a type compatible with each `break` expression.
272272
expression `()`.
273273

274274
[IDENTIFIER]: identifiers.html
275-
[temporary values]: expressions.html#temporary-lifetimes
275+
[temporary values]: expressions.html#temporaries
276276

277277
[_Expression_]: expressions.html
278278
[_BlockExpression_]: expressions/block-expr.html

src/expressions/operator-expr.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ assert_eq!(x, 14);
443443

444444
[place expression]: expressions.html#place-expressions-and-value-expressions
445445
[value expression]: expressions.html#place-expressions-and-value-expressions
446-
[temporary value]: expressions.html#temporary-lifetimes
446+
[temporary value]: expressions.html#temporaries
447447
[float-int]: https://github.com/rust-lang/rust/issues/10184
448448
[float-float]: https://github.com/rust-lang/rust/issues/15536
449449
[`unit` type]: types/tuple.html

src/introduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ attention to making those sections the best that they can be.
140140
[cargo book]: ../cargo/index.html
141141
[cargo reference]: ../cargo/reference/index.html
142142
[expressions chapter]: expressions.html
143-
[lifetime of temporaries]: expressions.html#temporary-lifetimes
143+
[lifetime of temporaries]: expressions.html#temporaries
144144
[linkage]: linkage.html
145145
[rustc book]: ../rustc/index.html
146146
[undocumented]: undocumented.html

src/types/pointer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ and raw pointers.
5454
[_TypeNoBounds_]: types.html#type-expressions
5555
[`unsafe` operation]: unsafety.html
5656
[dynamically sized types]: dynamically-sized-types.html
57-
[temporary value]: expressions.html#temporary-lifetimes
57+
[temporary value]: expressions.html#temporaries

src/variables.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Variables
22

33
A _variable_ is a component of a stack frame, either a named function parameter,
4-
an anonymous [temporary](expressions.html#temporary-lifetimes), or a named local
4+
an anonymous [temporary](expressions.html#temporaries), or a named local
55
variable.
66

77
A _local variable_ (or *stack-local* allocation) holds a value directly,

0 commit comments

Comments
 (0)