mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
8 lines
268 B
Rust
8 lines
268 B
Rust
fn read_lines_borrowed<'a>() -> Vec<&'a str> {
|
|
let rawLines: Vec<String> = vec!["foo ".to_string(), " bar".to_string()];
|
|
rawLines //~ ERROR cannot return value referencing local variable `rawLines`
|
|
.iter().map(|l| l.trim()).collect()
|
|
}
|
|
|
|
fn main() {}
|