Closed
Description
The following code compiles with NLL currently
fn main() {
let x = {
let z = 0;
&z
};
}
because it's equivalent to:
fn main() {
let x;
{
let z = 0;
x = &z
};
}
However, any further use of x will result in a "z
does not live long enough" warning. Should there be some read of x after the rest of the let is done to ensure that this doesn't happen?