]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-infer-proc-static-upvar.stderr
Rollup merge of #89468 - FabianWolff:issue-89358, r=jackh726
[rust.git] / src / test / ui / regions / regions-infer-proc-static-upvar.stderr
1 error[E0597]: `x` does not live long enough
2   --> $DIR/regions-infer-proc-static-upvar.rs:10:13
3    |
4 LL |       let y = &x;
5    |               ^^ borrowed value does not live long enough
6 LL | /     foo(move|| {
7 LL | |         let _a = *y;
8 LL | |     });
9    | |______- argument requires that `x` is borrowed for `'static`
10 LL |   }
11    |   - `x` dropped here while still borrowed
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0597`.