-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)
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...
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)