Skip to content

Commit dbc9380

Browse files
committed
Drop note about tail temporaries dropping after locals
This is no longer true in 2024
1 parent ebdace9 commit dbc9380

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/destructors.md

-4
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,6 @@ smallest scope that contains the expression and is one of the following:
216216

217217
> **Notes**:
218218
>
219-
> Temporaries that are created in the final expression of a function
220-
> body are dropped *after* any named variables bound in the function body.
221-
> Their drop scope is the entire function, as there is no smaller enclosing temporary scope.
222-
>
223219
> The [scrutinee] of a `match` expression is not a temporary scope, so
224220
> temporaries in the scrutinee can be dropped after the `match` expression. For
225221
> example, the temporary for `1` in `match 1 { ref mut z => z };` lives until

0 commit comments

Comments
 (0)