Skip to content

Commit ed9c535

Browse files
committed
Fix links and sentence structure
1 parent 20a6c37 commit ed9c535

File tree

7 files changed

+17
-15
lines changed

7 files changed

+17
-15
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.md#initialized
338339
[interior mutability]: interior-mutability.md
339340
[lazy boolean expression]: expressions/operator-expr.md#lazy-boolean-operators
341+
[place context]: expressions.md#place-expressions-and-value-expressions
340342
[statement]: statements.md
341-
[temporary]: expressions.md#temporary-lifetimes
343+
[temporary]: expressions.md#temporaries
342344
[variable]: variables.md
343345

344346
[array]: types/array.md

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

@@ -260,10 +259,11 @@ They are never allowed before:
260259
[let statement]: statements.md#let-statements
261260
[Mutable `static` items]: items/static-items.md#mutable-statics
262261
[scrutinee]: glossary.md#scrutinee
262+
[promoted]: destructors.md#constant-promotion
263263
[slice]: types/slice.md
264264
[statement]: statements.md
265265
[static variables]: items/static-items.md
266-
[Temporary values]: #temporary-lifetimes
266+
[Temporary values]: #temporaries
267267
[Variables]: variables.md
268268

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

src/expressions/loop-expr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,9 @@ expression `()`.
284284

285285
[LIFETIME_OR_LABEL]: ../tokens.md#lifetimes-and-loop-labels
286286
[_BlockExpression_]: block-expr.md
287-
[_Expression_]: ../ expressions.md
287+
[_Expression_]: ../expressions.md
288288
[_MatchArmPatterns_]: match-expr.md
289289
[_Pattern_]: ../patterns.md
290290
[`match` expression]: match-expr.md
291291
[scrutinee]: ../glossary.md#scrutinee
292-
[temporary values]: ../expressions.md#temporary-lifetimes
292+
[temporary values]: ../expressions.md#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.md#place-expressions-and-value-expressions
445445
[value expression]: ../expressions.md#place-expressions-and-value-expressions
446-
[temporary value]: ../expressions.md#temporary-lifetimes
446+
[temporary value]: ../expressions.md#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.md

src/introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ attention to making those sections the best that they can be.
139139
[_Expression_]: expressions.md
140140
[cargo book]: ../cargo/index.html
141141
[cargo reference]: ../cargo/reference/index.html
142-
[expressions chapter]: expressions.md
143-
[lifetime of temporaries]: expressions.md#temporary-lifetimes
144-
[linkage]: linkage.md
142+
[expressions chapter]: expressions.html
143+
[lifetime of temporaries]: expressions.html#temporaries
144+
[linkage]: linkage.html
145145
[rustc book]: ../rustc/index.html
146146
[Notation]: notation.md
147147
[Discord]: https://discord.gg/rust-lang

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.md#type-expressions
5555
[`unsafe` operation]: ../unsafety.md
5656
[dynamically sized types]: ../dynamically-sized-types.md
57-
[temporary value]: ../expressions.md#temporary-lifetimes
57+
[temporary value]: ../expressions.md#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.md#temporary-lifetimes), or a named local
4+
an anonymous [temporary](expressions.md#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)