@@ -382,11 +382,11 @@ expression which is one of the following:
382382* The operand(s) of an extending [ array] [ array expression ] , [ cast] [ cast
383383 expression] , [ braced struct] [ struct expression ] , or [ tuple] [ tuple expression ]
384384 expression.
385+ * The arguments to an extending [ tuple struct] or [ tuple variant] constructor expression.
385386* The final expression of any extending [ block expression] .
386387
387- So the borrow expressions in ` &mut 0 ` , ` (&1, &mut 2) ` , and ` Some { 0: &mut 3 } `
388- are all extending expressions. The borrows in ` &0 + &1 ` and ` Some(&mut 0) ` are
389- not: the latter is syntactically a function call expression.
388+ So the borrow expressions in ` &mut 0 ` , ` (&1, &mut 2) ` , and ` Some(&mut 3) `
389+ are all extending expressions. The borrows in ` &0 + &1 ` and ` f(&mut 0) ` are not.
390390
391391The operand of any extending borrow expression has its temporary scope
392392extended.
@@ -404,7 +404,7 @@ Here are some examples where expressions have extended temporary scopes:
404404let x = & temp ();
405405let x = & temp () as & dyn Send ;
406406let x = (& * & temp (),);
407- let x = { [Some { 0 : & temp (), } ] };
407+ let x = { [Some ( & temp ()) ] };
408408let ref x = temp ();
409409let ref x = * & temp ();
410410# x ;
@@ -419,7 +419,7 @@ Here are some examples where expressions don't have extended temporary scopes:
419419// The temporary that stores the result of `temp()` only lives until the
420420// end of the let statement in these cases.
421421
422- let x = Some (&temp()); // ERROR
422+ let x = std::convert::identity (&temp()); // ERROR
423423let x = (&temp()).use_temp(); // ERROR
424424# x;
425425```
@@ -476,6 +476,8 @@ There is one additional case to be aware of: when a panic reaches a [non-unwindi
476476[ struct pattern ] : patterns.md#struct-patterns
477477[ tuple pattern ] : patterns.md#tuple-patterns
478478[ tuple struct pattern ] : patterns.md#tuple-struct-patterns
479+ [ tuple struct ] : type.struct.tuple
480+ [ tuple variant ] : type.enum.declaration
479481
480482[ array expression ] : expressions/array-expr.md#array-expressions
481483[ block expression ] : expressions/block-expr.md
0 commit comments