error[E0700]: hidden type for `impl Future<Output = impl Sized>` captures lifetime that does not appear in bounds
  --> $DIR/nested-return-type4.rs:4:5
   |
LL | fn test<'s: 's>(s: &'s str) -> impl std::future::Future<Output = impl Sized> {
   |         --                     --------------------------------------------- opaque type defined here
   |         |
   |         hidden type `{async block@$DIR/nested-return-type4.rs:4:5: 4:15}` captures the lifetime `'s` as defined here
LL |     async move { let _s = s; }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: add a `use<...>` bound to explicitly capture `'s`
   |
LL | fn test<'s: 's>(s: &'s str) -> impl std::future::Future<Output = impl Sized> + use<'s> {
   |                                                                              +++++++++

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0700`.
