rust/src/test/ui/nll/borrowed-universal-error-2.rs
2018-12-25 21:08:33 -07:00

11 lines
185 B
Rust

#![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() {}