Closed
Description
In the test borrowck/borrowck-describe-lvalue.rs
, when using NLL by default for MIR borrowck, I started getting the odd error "Free region does not outlive" error below:
// Field from upvar nested
{
let mut x = 0;
|| {
|| { //[mir]~ ERROR free region `` does not outlive
let y = &mut x;
&mut x; //[ast]~ ERROR cannot borrow `**x` as mutable more than once at a time
//[mir]~^ ERROR cannot borrow `x` as mutable more than once at a time
*y = 1;
drop(y);
}
};
}
Seems like a bug.