2 // Tests that nested vtables work with overloaded calls.
4 // pretty-expanded FIXME #23616
6 #![feature(unboxed_closures, fn_traits)]
8 use std::marker::PhantomData;
12 struct G<A>(PhantomData<A>);
14 impl<'a, A: Add<i32, Output=i32>> Fn<(A,)> for G<A> {
15 extern "rust-call" fn call(&self, (arg,): (A,)) -> i32 {
20 impl<'a, A: Add<i32, Output=i32>> FnMut<(A,)> for G<A> {
21 extern "rust-call" fn call_mut(&mut self, args: (A,)) -> i32 { self.call(args) }
24 impl<'a, A: Add<i32, Output=i32>> FnOnce<(A,)> for G<A> {
26 extern "rust-call" fn call_once(self, args: (A,)) -> i32 { self.call(args) }