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:15:5
4 LL | invoke(&x, |a, b| if a > b { a } else { b });
7 note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 15:16...
8 --> $DIR/E0621-does-not-trigger-for-closures.rs:15:16
10 LL | invoke(&x, |a, b| if a > b { a } else { b });
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 note: ...so that reference does not outlive borrowed content
13 --> $DIR/E0621-does-not-trigger-for-closures.rs:15:45
15 LL | invoke(&x, |a, b| if a > b { a } else { b });
17 note: but, the lifetime must be valid for the call at 15:5...
18 --> $DIR/E0621-does-not-trigger-for-closures.rs:15:5
20 LL | invoke(&x, |a, b| if a > b { a } else { b });
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 note: ...so type `&i32` of expression is valid during the expression
23 --> $DIR/E0621-does-not-trigger-for-closures.rs:15:5
25 LL | invoke(&x, |a, b| if a > b { a } else { b });
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 error: aborting due to previous error
30 For more information about this error, try `rustc --explain E0495`.