]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unboxed-closures/unboxed-closure-region.nll.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / unboxed-closures / unboxed-closure-region.nll.stderr
1 error[E0597]: `x` does not live long enough
2   --> $DIR/unboxed-closure-region.rs:18:12
3    |
4 LL |     let _f = {
5    |         -- borrow later stored here
6 LL |         let x = 0;
7 LL |         || x //~ ERROR `x` does not live long enough
8    |         -- ^ borrowed value does not live long enough
9    |         |
10    |         value captured here
11 LL |     };
12    |     - `x` dropped here while still borrowed
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0597`.