1 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
2 --> $DIR/regions-nested-fns.rs:5:18
7 note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 7:58...
8 --> $DIR/regions-nested-fns.rs:7:58
10 LL | ignore::<Box<dyn for<'z> FnMut(&'z isize)>>(Box::new(|z| {
11 | __________________________________________________________^
17 note: ...so that reference does not outlive borrowed content
18 --> $DIR/regions-nested-fns.rs:10:14
22 note: but, the lifetime must be valid for the anonymous lifetime #2 defined on the body at 13:72...
23 --> $DIR/regions-nested-fns.rs:13:72
25 LL | ignore::< Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
26 | ________________________________________________________________________^
27 LL | | if false { return x; }
28 LL | | if false { return ay; }
32 = note: ...so that the types are compatible:
36 error[E0312]: lifetime of reference outlives lifetime of borrowed content...
37 --> $DIR/regions-nested-fns.rs:14:27
39 LL | if false { return x; }
42 note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 13:72...
43 --> $DIR/regions-nested-fns.rs:13:72
45 LL | ignore::< Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
46 | ________________________________________________________________________^
47 LL | | if false { return x; }
48 LL | | if false { return ay; }
52 note: ...but the borrowed content is only valid for the lifetime `'x` as defined on the function body at 3:11
53 --> $DIR/regions-nested-fns.rs:3:11
55 LL | fn nested<'x>(x: &'x isize) {
58 error: aborting due to 2 previous errors
60 Some errors have detailed explanations: E0312, E0495.
61 For more information about an error, try `rustc --explain E0312`.