rust/src/test/ui/issues/issue-13497-2.stderr
2018-12-25 21:08:33 -07:00

19 lines
644 B
Plaintext

error[E0597]: `rawLines` does not live long enough
--> $DIR/issue-13497-2.rs:3:5
|
LL | rawLines //~ ERROR `rawLines` does not live long enough
| ^^^^^^^^ borrowed value does not live long enough
LL | .iter().map(|l| l.trim()).collect()
LL | }
| - borrowed value only lives until here
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 1:24...
--> $DIR/issue-13497-2.rs:1: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`.