error[E0271]: type mismatch resolving ` as Future>::Output == ()` --> $DIR/issue-89686.rs:7:17 | LL | type G<'a, T> = impl Future; | ^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found `()` ... LL | async move { self.f().await } | ------------------ the expected `async` block | ::: $SRC_DIR/core/src/future/mod.rs:LL:COL | LL | pub const fn from_generator(gen: T) -> impl Future | ------------------------------- the expected opaque type | = note: expected associated type ` as Future>::Output` found unit type `()` = help: consider constraining the associated type ` as Future>::Output` to `()` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html error[E0277]: the trait bound `T: Trait` is not satisfied --> $DIR/issue-89686.rs:7:17 | LL | type G<'a, T> = impl Future; | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T` | help: consider restricting type parameter `T` | LL | type G<'a, T: Trait> = impl Future; | +++++++ error: aborting due to 2 previous errors Some errors have detailed explanations: E0271, E0277. For more information about an error, try `rustc --explain E0271`.