2018-08-08 07:28:26 -05:00
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
2018-12-25 09:56:47 -06:00
--> $DIR/regions-escape-via-trait-or-not.rs:18:14
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | with(|o| o)
2018-08-08 07:28:26 -05:00
| ^
|
2018-12-25 09:56:47 -06:00
note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 18:10...
--> $DIR/regions-escape-via-trait-or-not.rs:18:10
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | with(|o| o)
2018-08-08 07:28:26 -05:00
| ^^^^^
2019-12-03 21:20:05 -06:00
note: ...so that the expression is assignable
--> $DIR/regions-escape-via-trait-or-not.rs:18:14
|
LL | with(|o| o)
| ^
= note: expected `&isize`
found `&isize`
2018-12-25 09:56:47 -06:00
note: but, the lifetime must be valid for the expression at 18:5...
--> $DIR/regions-escape-via-trait-or-not.rs:18:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | with(|o| o)
2018-08-08 07:28:26 -05:00
| ^^^^
2018-12-25 09:56:47 -06:00
note: ...so type `fn([closure@$DIR/regions-escape-via-trait-or-not.rs:18:10: 18:15]) -> isize {with::<&isize, [closure@$DIR/regions-escape-via-trait-or-not.rs:18:10: 18:15]>}` of expression is valid during the expression
--> $DIR/regions-escape-via-trait-or-not.rs:18:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | with(|o| o)
2018-08-08 07:28:26 -05:00
| ^^^^
error: aborting due to previous error
2019-09-12 08:00:44 -05:00
For more information about this error, try `rustc --explain E0495`.