Skip to content

Commit e37d803

Browse files
committed
Adjust other references to extending expressions
1 parent a0ae157 commit e37d803

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/expressions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ r[expr.super-macros.intro]
262262
Certain built-in macros may create [temporaries] whose [scopes][temporary scopes] may be [extended]. These temporaries are *super temporaries* and these macros are *super macros*. [Invocations][macro invocations] of these macros are *super macro call expressions*. Arguments to these macros may be *super operands*.
263263

264264
> [!NOTE]
265-
> When a super macro call expression is an [extending expression], its super operands are [extending expressions] and the [scopes][temporary scopes] of the super temporaries are [extended]. See [destructors.scope.lifetime-extension.exprs].
265+
> The super operands of a super macro call are [extending expressions] and the [scopes][temporary scopes] of the super temporaries are [extended]. See [destructors.scope.lifetime-extension.exprs].
266266
267267
r[expr.super-macros.format_args]
268268
#### `format_args!`
@@ -272,10 +272,11 @@ Except for the format string argument, all arguments passed to [`format_args!`]
272272

273273
```rust,edition2024
274274
# fn temp() -> String { String::from("") }
275-
// Due to the call being an extending expression and the argument
276-
// being a super operand, the inner block is an extending expression,
277-
// so the scope of the temporary created in its trailing expression
278-
// is extended.
275+
// Due to the argument being a super operand, the inner block is an
276+
// extending expression, so the scope of the temporary created in its
277+
// trailing expression is extended to the extended scope of the call.
278+
// Since the call is the initializer of a `let` statement, this
279+
// extends it to the end of the surrounding block.
279280
let _ = format_args!("{}", { &temp() }); // OK
280281
```
281282

@@ -406,7 +407,6 @@ They are never allowed before:
406407
[destructors]: destructors.md
407408
[drop scope]: destructors.md#drop-scopes
408409
[extended]: destructors.scope.lifetime-extension
409-
[extending expression]: destructors.scope.lifetime-extension.exprs
410410
[extending expressions]: destructors.scope.lifetime-extension.exprs
411411
[field]: expressions/field-expr.md
412412
[functional update]: expressions/struct-expr.md#functional-update-syntax

src/expressions/operator-expr.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -900,9 +900,9 @@ r[expr.assign.destructure.tmp-scopes]
900900
901901
r[expr.assign.destructure.tmp-ext]
902902
> [!NOTE]
903-
> Due to the desugaring, the assigned value operand (the RHS) of a destructuring assignment is an [extending expression] within a newly-introduced block.
903+
> Due to the desugaring, the assigned value operand (the RHS) of a destructuring assignment is the initializer expression of a `let` statement within a newly-introduced block.
904904
>
905-
> Below, because the [temporary scope] is extended to the end of this introduced block, the assignment is allowed.
905+
> Below, because the [temporary scope] is [extended] to the end of this introduced block, the assignment is allowed.
906906
>
907907
> ```rust
908908
> # fn temp() {}
@@ -1089,7 +1089,7 @@ As with normal assignment expressions, compound assignment expressions always pr
10891089
[dropping]: ../destructors.md
10901090
[eval order test]: https://github.com/rust-lang/rust/blob/1.58.0/src/test/ui/expr/compound-assignment/eval-order.rs
10911091
[explicit discriminants]: ../items/enumerations.md#explicit-discriminants
1092-
[extending expression]: destructors.scope.lifetime-extension.exprs
1092+
[extended]: destructors.scope.lifetime-extension.exprs
10931093
[field-less enums]: ../items/enumerations.md#field-less-enum
10941094
[grouped expression]: grouped-expr.md
10951095
[literal expression]: literal-expr.md#integer-literal-expressions

0 commit comments

Comments
 (0)