]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions-nested-fns-2.nll.stderr
Rollup merge of #52695 - oli-obk:const_err_panic, r=petrochenkov
[rust.git] / src / test / ui / regions-nested-fns-2.nll.stderr
1 error[E0597]: `y` does not live long enough
2   --> $DIR/regions-nested-fns-2.rs:16:9
3    |
4 LL | /         |z| {
5 LL | |             //~^ ERROR E0373
6 LL | |             if false { &y } else { z }
7 LL | |         });
8    | |_________^ borrowed value does not live long enough
9 LL |   }
10    |   - `y` dropped here while still borrowed
11    |
12    = note: borrowed value must be valid for the static lifetime...
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0597`.