@@ -208,6 +208,18 @@ macro_rules! impl_add_binop_specify_output {
208208        & self  + & rhs
209209      } 
210210    } 
211+ 
212+     impl  AddAssign <$rhs> for  $lhs { 
213+       fn  add_assign( & mut  self ,  rhs:  $rhs)  { 
214+         * self  = & * self  + & rhs; 
215+       } 
216+     } 
217+ 
218+     impl <' b> AddAssign <& ' b $rhs> for  $lhs { 
219+       fn  add_assign( & mut  self ,  rhs:  & ' b $rhs)  { 
220+         * self  = & * self  + rhs; 
221+       } 
222+     } 
211223  } ; 
212224} 
213225
@@ -238,15 +250,18 @@ macro_rules! impl_sub_binop_specify_output {
238250        & self  - & rhs
239251      } 
240252    } 
241-   } ; 
242- } 
243253
244- /// impl_binops_additive_specify_output 
245- #[ macro_export]  
246- macro_rules!  impl_binops_additive_specify_output { 
247-   ( $lhs: ident,  $rhs: ident,  $output: ident)  => { 
248-     crate :: impl_add_binop_specify_output!( $lhs,  $rhs,  $output) ; 
249-     crate :: impl_sub_binop_specify_output!( $lhs,  $rhs,  $output) ; 
254+     impl  SubAssign <$rhs> for  $lhs { 
255+       fn  sub_assign( & mut  self ,  rhs:  $rhs)  { 
256+         * self  = & * self  - & rhs; 
257+       } 
258+     } 
259+ 
260+     impl <' b> SubAssign <& ' b $rhs> for  $lhs { 
261+       fn  sub_assign( & mut  self ,  rhs:  & ' b $rhs)  { 
262+         * self  = & * self  - rhs; 
263+       } 
264+     } 
250265  } ; 
251266} 
252267
@@ -277,46 +292,6 @@ macro_rules! impl_binops_multiplicative_mixed {
277292        & self  *  & rhs
278293      } 
279294    } 
280-   } ; 
281- } 
282- 
283- /// macro_rules! impl_binops_additive 
284- #[ macro_export]  
285- macro_rules!  impl_binops_additive { 
286-   ( $lhs: ident,  $rhs: ident)  => { 
287-     crate :: impl_binops_additive_specify_output!( $lhs,  $rhs,  $lhs) ; 
288- 
289-     impl  SubAssign <$rhs> for  $lhs { 
290-       fn  sub_assign( & mut  self ,  rhs:  $rhs)  { 
291-         * self  = & * self  - & rhs; 
292-       } 
293-     } 
294- 
295-     impl  AddAssign <$rhs> for  $lhs { 
296-       fn  add_assign( & mut  self ,  rhs:  $rhs)  { 
297-         * self  = & * self  + & rhs; 
298-       } 
299-     } 
300- 
301-     impl <' b> SubAssign <& ' b $rhs> for  $lhs { 
302-       fn  sub_assign( & mut  self ,  rhs:  & ' b $rhs)  { 
303-         * self  = & * self  - rhs; 
304-       } 
305-     } 
306- 
307-     impl <' b> AddAssign <& ' b $rhs> for  $lhs { 
308-       fn  add_assign( & mut  self ,  rhs:  & ' b $rhs)  { 
309-         * self  = & * self  + rhs; 
310-       } 
311-     } 
312-   } ; 
313- } 
314- 
315- /// macro_rules! impl_binops_multiplicative 
316- #[ macro_export]  
317- macro_rules!  impl_binops_multiplicative { 
318-   ( $lhs: ident,  $rhs: ident)  => { 
319-     crate :: impl_binops_multiplicative_mixed!( $lhs,  $rhs,  $lhs) ; 
320295
321296    impl  MulAssign <$rhs> for  $lhs { 
322297      fn  mul_assign( & mut  self ,  rhs:  $rhs)  { 
0 commit comments