| 51 let Pair(a, b) = self; |
51 let Pair(a, b) = self; |
| 52 Pair(a.$fn(), b.$fn()) |
52 Pair(a.$fn(), b.$fn()) |
| 53 } |
53 } |
| 54 } |
54 } |
| 55 |
55 |
| 56 impl<'a, A, B> $trait for &'a Pair<A, B> |
56 // Compiler overflow |
| 57 where |
57 // impl<'a, A, B> $trait for &'a Pair<A, B> |
| 58 &'a A: $trait, |
58 // where |
| 59 &'a B: $trait, |
59 // &'a A: $trait, |
| 60 { |
60 // &'a B: $trait, |
| 61 type Output = Pair<<&'a A as $trait>::Output, <&'a B as $trait>::Output>; |
61 // { |
| 62 fn $fn(self) -> Self::Output { |
62 // type Output = Pair<<&'a A as $trait>::Output, <&'a B as $trait>::Output>; |
| 63 let Pair(ref a, ref b) = self; |
63 // fn $fn(self) -> Self::Output { |
| 64 Pair(a.$fn(), b.$fn()) |
64 // let Pair(ref a, ref b) = self; |
| 65 } |
65 // Pair(a.$fn(), b.$fn()) |
| 66 } |
66 // } |
| |
67 // } |
| 67 }; |
68 }; |
| 68 } |
69 } |
| 69 |
70 |
| 70 impl_unary!(Neg, neg); |
71 impl_unary!(Neg, neg); |
| 71 |
72 |