1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// check-pass #![feature(unboxed_closures, fn_traits)] struct Foo; impl<A> FnOnce<(A,)> for Foo { type Output = (); extern "rust-call" fn call_once(self, (_,): (A,)) { } } fn main() { println!("{:?}", Foo("bar")); }