summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-13497-2.rs
blob: c82da0f0096add49998e548647c038ceb0504001 (plain)
1
2
3
4
5
6
7
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() {}