Since 1.79, the temporaries are extended in the following example: ````rust let a = if true { ..; &temp() // used to error, but now gets lifetime extended } else { ..; &temp() // used to error, but now gets lifetime extended }; ```` The list in [extending-based-on-expressions](https://doc.rust-lang.org/reference/destructors.html#extending-based-on-expressions) seems to be out-of-date.
Activity
ehuss commentedon Jul 26, 2024
cc rust-lang/rust#121346. @m-ou-se would you be able to help with that?