reference icon indicating copy to clipboard operation
reference copied to clipboard

Propagate temporary lifetime extension into if and match expressions

Open xmh0511 opened this issue 1 year ago • 1 comments

Since 1.79, the temporaries are extended in the following example:

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 seems to be out-of-date.

xmh0511 avatar Jul 26 '24 06:07 xmh0511