2014-10-02 14:52:06 -05:00
|
|
|
fn read_lines_borrowed<'a>() -> Vec<&'a str> {
|
|
|
|
let rawLines: Vec<String> = vec!["foo ".to_string(), " bar".to_string()];
|
2022-02-17 10:00:04 -06:00
|
|
|
rawLines //~ ERROR cannot return value referencing local variable `rawLines`
|
|
|
|
.iter().map(|l| l.trim()).collect()
|
2014-10-02 14:52:06 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|