blob: 151c8307a14f605e224806c75a69d537c8b9fa72 [file] [log] [blame]
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter 'r in function call due to conflicting requirements
--> $DIR/regions-infer-call-3.rs:8:24
|
LL | let z = with(|y| { select(x, y) });
| ^^^^^^^^^^^^
|
note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 8:18...
--> $DIR/regions-infer-call-3.rs:8:18
|
LL | let z = with(|y| { select(x, y) });
| ^^^^^^^^^^^^^^^^^^^^
note: ...so that reference does not outlive borrowed content
--> $DIR/regions-infer-call-3.rs:8:34
|
LL | let z = with(|y| { select(x, y) });
| ^
note: but, the lifetime must be valid for the call at 8:13...
--> $DIR/regions-infer-call-3.rs:8:13
|
LL | let z = with(|y| { select(x, y) });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...so type `&isize` of expression is valid during the expression
--> $DIR/regions-infer-call-3.rs:8:13
|
LL | let z = with(|y| { select(x, y) });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error