summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/borrowed-universal-error-2.rs
blob: 3f9b2f2924c2cf3d4c8a9c1bef71f0ccee5609f6 (plain)
1
2
3
4
5
6
7
fn foo<'a>(x: &'a (u32,)) -> &'a u32 {
    let v = 22;
    &v
    //~^ ERROR cannot return reference to local variable `v` [E0515]
}

fn main() {}