]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/borrowed-local-error.rs
Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorino
[rust.git] / src / test / ui / nll / borrowed-local-error.rs
1 fn gimme(x: &(u32,)) -> &u32 {
2     &x.0
3 }
4
5 fn main() {
6     let x = gimme({
7         let v = (22,);
8         &v
9         //~^ ERROR `v` does not live long enough [E0597]
10     });
11     println!("{:?}", x);
12 }