]> git.proxmox.com Git - rustc.git/blob - src/test/ui/dropck/drop-with-active-borrows-2.nll.stderr
4f792a9c9d28f5635ba68f03dba751bc60590232
[rustc.git] / src / test / ui / dropck / drop-with-active-borrows-2.nll.stderr
1 error[E0597]: `raw_lines` does not live long enough
2 --> $DIR/drop-with-active-borrows-2.rs:13:5
3 |
4 LL | raw_lines.iter().map(|l| l.trim()).collect()
5 | ^^^^^^^^^ borrowed value does not live long enough
6 LL | //~^ ERROR `raw_lines` does not live long enough
7 LL | }
8 | - `raw_lines` dropped here while still borrowed
9 |
10 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 11:24...
11 --> $DIR/drop-with-active-borrows-2.rs:11:24
12 |
13 LL | fn read_lines_borrowed<'a>() -> Vec<&'a str> {
14 | ^^
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0597`.