2018-08-08 12:28:26 +00:00
|
|
|
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter 'r in function call due to conflicting requirements
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/regions-infer-call-3.rs:8:24
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let z = with(|y| { select(x, y) });
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
2018-12-25 15:56:47 +00:00
|
|
|
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
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let z = with(|y| { select(x, y) });
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: ...so that reference does not outlive borrowed content
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/regions-infer-call-3.rs:8:34
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let z = with(|y| { select(x, y) });
|
|
|
|
| ^
|
2018-12-25 15:56:47 +00:00
|
|
|
note: but, the lifetime must be valid for the call at 8:13...
|
|
|
|
--> $DIR/regions-infer-call-3.rs:8:13
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let z = with(|y| { select(x, y) });
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: ...so type `&isize` of expression is valid during the expression
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/regions-infer-call-3.rs:8:13
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let z = with(|y| { select(x, y) });
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2019-09-12 13:00:44 +00:00
|
|
|
For more information about this error, try `rustc --explain E0495`.
|