error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
  --> $DIR/hidden-type-suggestion.rs:6:5
   |
LL | fn lifetime<'a, 'b>(x: &'a ()) -> impl Sized + use<'b> {
   |             --                    -------------------- opaque type defined here
   |             |
   |             hidden type `&'a ()` captures the lifetime `'a` as defined here
LL |
LL |     x
   |     ^
   |
help: add `'a` to the `use<...>` bound to explicitly capture it
   |
LL | fn lifetime<'a, 'b>(x: &'a ()) -> impl Sized + use<'b, 'a> {
   |                                                      ++++

error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
  --> $DIR/hidden-type-suggestion.rs:12:5
   |
LL | fn param<'a, T>(x: &'a ()) -> impl Sized + use<T> {
   |          --                   ------------------- opaque type defined here
   |          |
   |          hidden type `&'a ()` captures the lifetime `'a` as defined here
LL |
LL |     x
   |     ^
   |
help: add `'a` to the `use<...>` bound to explicitly capture it
   |
LL | fn param<'a, T>(x: &'a ()) -> impl Sized + use<'a, T> {
   |                                                +++

error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
  --> $DIR/hidden-type-suggestion.rs:18:5
   |
LL | fn empty<'a>(x: &'a ()) -> impl Sized + use<> {
   |          --                ------------------ opaque type defined here
   |          |
   |          hidden type `&'a ()` captures the lifetime `'a` as defined here
LL |
LL |     x
   |     ^
   |
help: add `'a` to the `use<...>` bound to explicitly capture it
   |
LL | fn empty<'a>(x: &'a ()) -> impl Sized + use<'a> {
   |                                             ++

error: aborting due to 3 previous errors

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