about summary refs log tree commit diff
path: root/tests/ui/lifetimes/return-reference-local-variable-13497.stderr
blob: f5419f114ca29e55e8ca19e840296f0d08f9d42d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
error[E0515]: cannot return value referencing local variable `rawLines`
  --> $DIR/return-reference-local-variable-13497.rs:5:5
   |
LL |       rawLines
   |       ^-------
   |       |
   |  _____`rawLines` is borrowed here
   | |
LL | |         .iter()
LL | |         .map(|l| l.trim())
LL | |         .collect()
   | |__________________^ returns a value referencing data owned by the current function

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0515`.