1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
//@ known-bug: #140303 //@compile-flags: -Zvalidate-mir use std::future::Future; async fn a() -> impl Sized { b(c) } async fn c(); // kaboom fn b<d>(e: d) -> impl Sized where d: f, { || -> <d>::h { panic!() } } trait f { type h; } impl<d, g> f for d where d: Fn() -> g, g: Future, { }