mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
10 lines
276 B
Rust
10 lines
276 B
Rust
fn read_lines_borrowed1() -> Vec<
|
|
&str //~ ERROR missing lifetime specifier
|
|
> {
|
|
let rawLines: Vec<String> = vec!["foo ".to_string(), " bar".to_string()];
|
|
rawLines.iter().map(|l| l.trim()).collect()
|
|
//~^ ERROR: cannot return value referencing
|
|
}
|
|
|
|
fn main() {}
|