rust/tests/ui/issues/issue-13497.rs

10 lines
276 B
Rust
Raw Normal View History

2014-10-02 19:52:06 +00:00
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
2014-10-02 19:52:06 +00:00
}
fn main() {}