1 error[E0700]: hidden type for `impl Future<Output = impl Sized>` captures lifetime that does not appear in bounds
2 --> $DIR/nested-return-type4.rs:4:5
4 LL | fn test<'s: 's>(s: &'s str) -> impl std::future::Future<Output = impl Sized> {
5 | -- hidden type `[async block@$DIR/nested-return-type4.rs:4:5: 4:31]` captures the lifetime `'s` as defined here
6 LL | async move { let _s = s; }
7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
9 help: to declare that `impl Future<Output = impl Sized>` captures `'s`, you can add an explicit `'s` lifetime bound
11 LL | fn test<'s: 's>(s: &'s str) -> impl std::future::Future<Output = impl Sized> + 's {
13 help: to declare that `impl Sized` captures `'s`, you can add an explicit `'s` lifetime bound
15 LL | fn test<'s: 's>(s: &'s str) -> impl std::future::Future<Output = impl Sized + 's> {
18 error: aborting due to previous error
20 For more information about this error, try `rustc --explain E0700`.