1 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
2 --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5
4 25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
7 note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 25:16...
8 --> $DIR/E0621-does-not-trigger-for-closures.rs:25:16
10 25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 note: ...so that reference does not outlive borrowed content
13 --> $DIR/E0621-does-not-trigger-for-closures.rs:25:45
15 25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
17 note: but, the lifetime must be valid for the call at 25:5...
18 --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5
20 25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 note: ...so type `&i32` of expression is valid during the expression
23 --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5
25 25 | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 error: aborting due to previous error