]> git.lizzy.rs Git - rust.git/blob - tests/ui/regions/regions-infer-proc-static-upvar.stderr
internally change regions to be covariant
[rust.git] / tests / 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 x = 3;
5    |           - binding `x` declared here
6 LL |       let y = &x;
7    |               ^^ borrowed value does not live long enough
8 LL | /     foo(move|| {
9 LL | |         let _a = *y;
10 LL | |     });
11    | |______- argument requires that `x` is borrowed for `'static`
12 LL |   }
13    |   - `x` dropped here while still borrowed
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0597`.