"Expected lifetime parameter" with future utilizing std::error::Error
Hi,
I have an issue trying to satisfy Rust's borrow checker when dealing with futures:
extern crate futures;
use futures::Future;
use std::error::Error;
fn foo() -> impl Future<Item=(), Error=Box<Error>> {
Ok(())
}
Compiler points at the Error inside Box<Error> and tells me: expected lifetime parameter, which I cannot figure out.
What's the expected lifetime parameter in this case?
Seems like it should compile without any trouble (since we're boxing the error anyway).
Thanks for any help,
Patryk.