//@ run-pass struct AT,T>(F::Output); struct BT,T>(A); // Removing Option causes it to compile. fn fooT>(f: F) -> Option> { Some(B(A(f()))) } fn main() { let v = (|| foo(||4))(); match v { Some(B(A(4))) => {}, _ => unreachable!() } }