Closed
Description
This code compiles without feature(nll):
#![feature(nll)]
fn main() {
let mut m = vec![[0; 1]; 1];
m[0][0] = 1;
}
With feature(nll) it gives:
error[E0597]: `m` does not live long enough
--> ...\test.rs:4:5
|
4 | m[0][0] = 1;
| ^ borrowed value does not live long enough
5 | }
| - borrowed value only lives until here
|
= note: borrowed value must be valid for lifetime '_#2r...