blob: da560107cea997ef81166664786b9ba0b26ddb3c [file] [log] [blame]
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
--> $DIR/regions-ret-borrowed.rs:13:14
|
LL | with(|o| o)
| ^
|
note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 13:10...
--> $DIR/regions-ret-borrowed.rs:13:10
|
LL | with(|o| o)
| ^^^^^
note: ...so that the expression is assignable
--> $DIR/regions-ret-borrowed.rs:13: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 12:14...
--> $DIR/regions-ret-borrowed.rs:12:14
|
LL | fn return_it<'a>() -> &'a isize {
| ^^
note: ...so that reference does not outlive borrowed content
--> $DIR/regions-ret-borrowed.rs:13:5
|
LL | with(|o| o)
| ^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0495`.