blob: 0fd4bf81039ca3953bbcbb9f110d9f4b5bd157ea [file] [log] [blame]
error[E0597]: `raw_lines` does not live long enough
--> $DIR/drop-with-active-borrows-2.rs:13:5
|
LL | raw_lines.iter().map(|l| l.trim()).collect()
| ^^^^^^^^^ borrowed value does not live long enough
LL | //~^ ERROR `raw_lines` does not live long enough
LL | }
| - borrowed value only lives until here
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 11:24...
--> $DIR/drop-with-active-borrows-2.rs:11:24
|
LL | fn read_lines_borrowed<'a>() -> Vec<&'a str> {
| ^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.