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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
268 B
Rust
Raw Normal View History

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