]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/borrowed-local-error.rs
Rollup merge of #103146 - joboet:cleanup_pthread_condvar, r=Mark-Simulacrum
[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 }