There was some related discussion about temporary lifetime inconsistency in this recent thread:
mbrubeck
8
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Why does the temporary in the last statement is dropped after the local variable? | 30 | 1287 | October 12, 2023 | |
| Variable scopes extend beyond the match expression | 4 | 1301 | October 30, 2020 | |
| Why does match keep temporary values in scope through arms? | 6 | 1051 | November 25, 2020 | |
| Drop rules for temporaries in final expression | 3 | 509 | February 15, 2021 | |
| Drop semantics and temporary value lifetimes in while let | 16 | 3856 | August 3, 2019 |