summary refs log tree commit diff
path: root/src/test/ui/nll/borrowed-universal-error-2.rs
blob: a10a62b470d76b1a2e02e41251034477f1f1456f (plain)
1
2
3
4
5
6
7
8
9
10
#![feature(nll)]
#![allow(warnings)]

fn foo<'a>(x: &'a (u32,)) -> &'a u32 {
    let v = 22;
    &v
    //~^ ERROR cannot return reference to local variable `v` [E0515]
}

fn main() {}