Skip to content

Commit 79fcc6e

Browse files
matthewjasperehuss
authored andcommitted
Fix links and sentence structure
1 parent 62191f6 commit 79fcc6e

File tree

7 files changed

+16
-14
lines changed

7 files changed

+16
-14
lines changed

src/destructors.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ scope of the initializer expression is extended.
278278

279279
#### Extending based on expressions
280280

281-
For a let statement with an initializer, an *extending expression* if it is
281+
For a let statement with an initializer, an *extending expression* is an
282+
expression which is one of the following:
282283

283284
* The initializer expression.
284285
* The operand of a extending [borrow expression].
@@ -342,8 +343,9 @@ variable or field from being dropped automatically.
342343
[initialized]: glossary.md#initialized
343344
[interior mutability]: interior-mutability.md
344345
[lazy boolean expression]: expressions/operator-expr.md#lazy-boolean-operators
346+
[place context]: expressions.md#place-expressions-and-value-expressions
345347
[statement]: statements.md
346-
[temporary]: expressions.md#temporary-lifetimes
348+
[temporary]: expressions.md#temporaries
347349
[variable]: variables.md
348350

349351
[array]: types/array.md

src/expressions.md

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

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

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

170169
### Implicit Borrows
171170

@@ -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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,6 @@ expression `()`.
295295
[_Pattern_]: ../patterns.md
296296
[`match` expression]: match-expr.md
297297
[scrutinee]: ../glossary.md#scrutinee
298-
[temporary values]: ../expressions.md#temporary-lifetimes
298+
[temporary values]: ../expressions.md#temporaries
299299
[_LazyBooleanOperatorExpression_]: operator-expr.md#lazy-boolean-operators
300300
[`if let` expressions]: if-expr.md#if-let-expressions

src/expressions/operator-expr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ assert_eq!(x, 14);
455455

456456
[place expression]: ../expressions.md#place-expressions-and-value-expressions
457457
[value expression]: ../expressions.md#place-expressions-and-value-expressions
458-
[temporary value]: ../expressions.md#temporary-lifetimes
458+
[temporary value]: ../expressions.md#temporaries
459459
[float-int]: https://github.com/rust-lang/rust/issues/10184
460460
[float-float]: https://github.com/rust-lang/rust/issues/15536
461461
[`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
@@ -56,4 +56,4 @@ and raw pointers.
5656
[_TypeNoBounds_]: ../types.md#type-expressions
5757
[`unsafe` operation]: ../unsafety.md
5858
[dynamically sized types]: ../dynamically-sized-types.md
59-
[temporary value]: ../expressions.md#temporary-lifetimes
59+
[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)