Add note about non-extension of array repeat operands
We document that the operands of an extending array expression are
extending expressions, but `rustc` doesn't treat the repeat operand
that way. Let's add a note about that flagging it as an open question
and link to the relevant issue.
diff --git a/src/destructors.md b/src/destructors.md
index ff62b00..3a08fb2 100644
--- a/src/destructors.md
+++ b/src/destructors.md
@@ -444,6 +444,11 @@
The operand of any extending borrow expression has its temporary scope
extended.
+> [!NOTE]
+> `rustc` does not treat [array repeat operands] of extending [array] expressions as extending expressions. Whether it should is an open question.
+>
+> For details, see [Rust issue #146092](https://github.com/rust-lang/rust/issues/146092).
+
#### Examples
Here are some examples where expressions have extended temporary scopes:
@@ -594,6 +599,7 @@
[tuple variant]: type.enum.declaration
[array expression]: expressions/array-expr.md#array-expressions
+[array repeat operands]: expr.array.repeat-operand
[async block expression]: expr.block.async
[block expression]: expressions/block-expr.md
[borrow expression]: expressions/operator-expr.md#borrow-operators