//@ known-bug: #135470 //@ compile-flags: -Copt-level=0 //@ edition: 2021 use std::future::Future; trait Access { type Lister; fn list() -> impl Future { async { todo!() } } } trait Foo {} impl Access for dyn Foo { type Lister = (); } fn main() { let svc = async { async { ::list() }.await; }; &svc as &dyn Service; } trait UnaryService { fn call2() {} } trait Unimplemented {} impl UnaryService for T {} struct Wrap(T); impl UnaryService for Wrap {} trait Service { fn call(&self); } impl Service for T { fn call(&self) { Wrap::::call2(); } }