1 error: lifetime may not live long enough
2 --> $DIR/closure-substs.rs:6:16
5 | -- lifetime `'a` defined here
8 | ^ returning this value requires that `'a` must outlive `'static`
10 error: lifetime may not live long enough
11 --> $DIR/closure-substs.rs:13:16
13 LL | |x: &i32| -> &'static i32 {
14 | - let's call the lifetime of this reference `'1`
16 | ^ returning this value requires that `'1` must outlive `'static`
18 error: lifetime may not live long enough
19 --> $DIR/closure-substs.rs:20:9
22 | -- lifetime `'a` defined here
25 | ^^^^ argument requires that `'a` must outlive `'static`
27 error[E0521]: borrowed data escapes outside of closure
28 --> $DIR/closure-substs.rs:27:9
30 LL | |x: &i32, b: fn(&'static i32)| {
31 | - - let's call the lifetime of this reference `'1`
33 | `x` is a reference that is only valid in the closure body
37 | `x` escapes the closure body here
38 | argument requires that `'1` must outlive `'static`
40 error: aborting due to 4 previous errors
42 For more information about this error, try `rustc --explain E0521`.