diff options
Diffstat (limited to 'src/libcore/ops.rs')
| -rw-r--r-- | src/libcore/ops.rs | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index d71c7e3b339..e16b24923a8 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -864,53 +864,3 @@ impl<F,A,R> FnOnce<A,R> for F self.call_mut(args) } } - -#[cfg(stage0)] -mod fn_impls { - use super::Fn; - - impl<Result> Fn<(),Result> for extern "Rust" fn() -> Result { - #[allow(non_snake_case)] - extern "rust-call" fn call(&self, _args: ()) -> Result { - (*self)() - } - } - - impl<Result,A0> Fn<(A0,),Result> for extern "Rust" fn(A0) -> Result { - #[allow(non_snake_case)] - extern "rust-call" fn call(&self, args: (A0,)) -> Result { - let (a0,) = args; - (*self)(a0) - } - } - - macro_rules! def_fn( - ($($args:ident)*) => ( - impl<Result$(,$args)*> - Fn<($($args,)*),Result> - for extern "Rust" fn($($args: $args,)*) -> Result { - #[allow(non_snake_case)] - extern "rust-call" fn call(&self, args: ($($args,)*)) -> Result { - let ($($args,)*) = args; - (*self)($($args,)*) - } - } - ) - ) - - def_fn!(A0 A1) - def_fn!(A0 A1 A2) - def_fn!(A0 A1 A2 A3) - def_fn!(A0 A1 A2 A3 A4) - def_fn!(A0 A1 A2 A3 A4 A5) - def_fn!(A0 A1 A2 A3 A4 A5 A6) - def_fn!(A0 A1 A2 A3 A4 A5 A6 A7) - def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8) - def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9) - def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10) - def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11) - def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12) - def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13) - def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14) - def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15) -} |
