An example is the following code:
fn f() -> impl Future<Item = (), Error = Error> {
my_future.and_then(move |_| {
foo("blah")
})
}
fn foo<T: AsRef<str>>(t: T) {
unimplemented!()
}
The current nightly rustc complains about unnamed lifetimes in impl trait. It accepts the same code with "blah" replaced by "blah".to_owned().
I believe "blah" should be recognised of lifetime 'static, and this code should be accepted by the compiler.
An example is the following code:
The current nightly rustc complains about unnamed lifetimes in impl trait. It accepts the same code with
"blah"replaced by"blah".to_owned().I believe
"blah"should be recognised of lifetime'static, and this code should be accepted by the compiler.