@@ -8,18 +8,13 @@ use error::HANDLE_ERROR;
88use self :: libc:: { c_int} ;
99use data:: { constant, tile} ;
1010use self :: num:: Complex ;
11- use index:: { Indexer , assign_gen} ;
12- use seq:: Seq ;
13- use std:: mem;
1411
1512type MutAfArray = * mut self :: libc:: c_longlong ;
1613type MutDouble = * mut self :: libc:: c_double ;
1714type MutUint = * mut self :: libc:: c_uint ;
1815type AfArray = self :: libc:: c_longlong ;
1916
2017use std:: ops:: { Add , Sub , Div , Mul , BitAnd , BitOr , BitXor , Not , Rem , Shl , Shr } ;
21- use std:: ops:: { AddAssign , SubAssign , DivAssign , MulAssign , BitAndAssign , BitOrAssign , BitXorAssign ,
22- RemAssign , ShlAssign , ShrAssign } ;
2318
2419#[ allow( dead_code) ]
2520extern {
@@ -343,6 +338,18 @@ arith_func!(BitXor, bitxor, af_bitxor);
343338arith_func ! ( Shl , shl, af_bitshiftl) ;
344339arith_func ! ( Shr , shr, af_bitshiftr) ;
345340
341+ #[ cfg( op_assign) ]
342+ mod op_assign {
343+
344+ use array:: Array ;
345+ use super :: * ;
346+ use index:: { Indexer , assign_gen} ;
347+ use seq:: Seq ;
348+ use std:: mem;
349+ use std:: ops:: { AddAssign , SubAssign , DivAssign , MulAssign , RemAssign } ;
350+ use std:: ops:: { BitAndAssign , BitOrAssign , BitXorAssign , ShlAssign , ShrAssign } ;
351+
352+
346353macro_rules! arith_assign_func {
347354 ( $op_name: ident, $fn_name: ident, $func: ident) => (
348355 impl $op_name<Array > for Array {
@@ -387,3 +394,5 @@ macro_rules! bit_assign_func {
387394bit_assign_func ! ( BitAndAssign , bitand_assign, bitand) ;
388395bit_assign_func ! ( BitOrAssign , bitor_assign, bitor) ;
389396bit_assign_func ! ( BitXorAssign , bitxor_assign, bitxor) ;
397+
398+ }
0 commit comments