Skip to content

Commit f9e9525

Browse files
committed
Fix links and sentence structure
1 parent 215a824 commit f9e9525

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

src/destructors.md

Lines changed: 4 additions & 2 deletions
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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ the remaining situations if that type is [`Sized`], then it may be possible to
123123
move the value. Only the following place expressions may be moved out of:
124124

125125
* [Variables] which are not currently borrowed.
126-
* [Temporary values](#temporary-lifetimes).
126+
* [Temporary values](#temporaries).
127127
* [Fields][field] of a place expression which can be moved out of and
128128
doesn't implement [`Drop`].
129129
* The result of [dereferencing][deref] an expression with type [`Box<T>`] and
@@ -161,9 +161,8 @@ The following expressions can be mutable place expression contexts:
161161

162162
When using a value expression in most place expression contexts, a temporary
163163
unnamed memory location is created initialized to that value and the expression
164-
evaluates to that location instead, except if [promoted](#constant-promotion)
165-
to a `static`. The [drop scope] of the temporary is usually the end of the
166-
enclosing statement.
164+
evaluates to that location instead, except if [promoted] to a `static`. The
165+
[drop scope] of the temporary is usually the end of the enclosing statement.
167166

168167
### Implicit Borrows
169168

@@ -261,10 +260,11 @@ They are never allowed before:
261260
[let statement]: statements.html#let-statements
262261
[Mutable `static` items]: items/static-items.html#mutable-statics
263262
[scrutinee]: glossary.html#scrutinee
263+
[promoted]: destructors.html#constant-promotion
264264
[slice]: types/slice.html
265265
[statement]: statements.html
266266
[static variables]: items/static-items.html
267-
[Temporary values]: #temporary-lifetimes
267+
[Temporary values]: #temporaries
268268
[Variables]: variables.html
269269

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

src/expressions/loop-expr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,4 +290,4 @@ expression `()`.
290290
[_Pattern_]: patterns.html
291291
[`match` expression]: expressions/match-expr.html
292292
[scrutinee]: glossary.html#scrutinee
293-
[temporary values]: expressions.html#temporary-lifetimes
293+
[temporary values]: expressions.html#temporaries

src/expressions/operator-expr.md

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)