blob: 2c4769d8e37516e996192a5141f9e8eabf65b25c [file] [log] [blame]
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
--> $DIR/regions-ret-borrowed-1.rs:10:14
|
LL | with(|o| o)
| ^
|
note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 10:10...
--> $DIR/regions-ret-borrowed-1.rs:10:10
|
LL | with(|o| o)
| ^^^^^
note: ...so that the expression is assignable
--> $DIR/regions-ret-borrowed-1.rs:10:14
|
LL | with(|o| o)
| ^
= note: expected `&isize`
found `&isize`
note: but, the lifetime must be valid for the lifetime `'a` as defined on the function body at 9:14...
--> $DIR/regions-ret-borrowed-1.rs:9:14
|
LL | fn return_it<'a>() -> &'a isize {
| ^^
note: ...so that reference does not outlive borrowed content
--> $DIR/regions-ret-borrowed-1.rs:10:5
|
LL | with(|o| o)
| ^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0495`.