rust/src/test/ui/dropck/drop-with-active-borrows-2.stderr

12 lines
441 B
Plaintext
Raw Normal View History

error[E0515]: cannot return value referencing local variable `raw_lines`
2021-12-29 09:19:57 +01:00
--> $DIR/drop-with-active-borrows-2.rs:3:30
2018-08-08 14:28:26 +02:00
|
LL | raw_lines.iter().map(|l| l.trim()).collect()
2021-12-29 09:19:57 +01:00
| ---------------- ^^^^^^^^ returns a value referencing data owned by the current function
| |
| `raw_lines` is borrowed here
2018-08-08 14:28:26 +02:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0515`.