1 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter 'r in function call due to conflicting requirements
2 --> $DIR/regions-infer-call-3.rs:18:24
4 LL | let z = with(|y| { select(x, y) });
7 note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 18:18...
8 --> $DIR/regions-infer-call-3.rs:18:18
10 LL | let z = with(|y| { select(x, y) });
11 | ^^^^^^^^^^^^^^^^^^^^
12 note: ...so that reference does not outlive borrowed content
13 --> $DIR/regions-infer-call-3.rs:18:34
15 LL | let z = with(|y| { select(x, y) });
17 note: but, the lifetime must be valid for the call at 18:13...
18 --> $DIR/regions-infer-call-3.rs:18:13
20 LL | let z = with(|y| { select(x, y) });
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
22 note: ...so type `&isize` of expression is valid during the expression
23 --> $DIR/regions-infer-call-3.rs:18:13
25 LL | let z = with(|y| { select(x, y) });
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
28 error: aborting due to previous error
30 For more information about this error, try `rustc --explain E0495`.