@@ -655,7 +655,7 @@ where
655
655
656
656
/// Trait for determining dimensionality of input and output for [`s!`] macro.
657
657
#[ doc( hidden) ]
658
- pub trait SliceArg {
658
+ pub trait SliceNextDim {
659
659
/// Number of dimensions that this slicing argument consumes in the input array.
660
660
type InDim : Dimension ;
661
661
/// Number of dimensions that this slicing argument produces in the output array.
@@ -676,28 +676,28 @@ pub trait SliceArg {
676
676
}
677
677
}
678
678
679
- macro_rules! impl_slicearg {
679
+ macro_rules! impl_slicenextdim {
680
680
( ( $( $generics: tt) * ) , $self: ty, $in: ty, $out: ty) => {
681
- impl <$( $generics) * > SliceArg for $self {
681
+ impl <$( $generics) * > SliceNextDim for $self {
682
682
type InDim = $in;
683
683
type OutDim = $out;
684
684
}
685
685
} ;
686
686
}
687
687
688
- impl_slicearg ! ( ( ) , isize , Ix1 , Ix0 ) ;
689
- impl_slicearg ! ( ( ) , usize , Ix1 , Ix0 ) ;
690
- impl_slicearg ! ( ( ) , i32 , Ix1 , Ix0 ) ;
688
+ impl_slicenextdim ! ( ( ) , isize , Ix1 , Ix0 ) ;
689
+ impl_slicenextdim ! ( ( ) , usize , Ix1 , Ix0 ) ;
690
+ impl_slicenextdim ! ( ( ) , i32 , Ix1 , Ix0 ) ;
691
691
692
- impl_slicearg ! ( ( T ) , Range <T >, Ix1 , Ix1 ) ;
693
- impl_slicearg ! ( ( T ) , RangeInclusive <T >, Ix1 , Ix1 ) ;
694
- impl_slicearg ! ( ( T ) , RangeFrom <T >, Ix1 , Ix1 ) ;
695
- impl_slicearg ! ( ( T ) , RangeTo <T >, Ix1 , Ix1 ) ;
696
- impl_slicearg ! ( ( T ) , RangeToInclusive <T >, Ix1 , Ix1 ) ;
697
- impl_slicearg ! ( ( ) , RangeFull , Ix1 , Ix1 ) ;
698
- impl_slicearg ! ( ( ) , Slice , Ix1 , Ix1 ) ;
692
+ impl_slicenextdim ! ( ( T ) , Range <T >, Ix1 , Ix1 ) ;
693
+ impl_slicenextdim ! ( ( T ) , RangeInclusive <T >, Ix1 , Ix1 ) ;
694
+ impl_slicenextdim ! ( ( T ) , RangeFrom <T >, Ix1 , Ix1 ) ;
695
+ impl_slicenextdim ! ( ( T ) , RangeTo <T >, Ix1 , Ix1 ) ;
696
+ impl_slicenextdim ! ( ( T ) , RangeToInclusive <T >, Ix1 , Ix1 ) ;
697
+ impl_slicenextdim ! ( ( ) , RangeFull , Ix1 , Ix1 ) ;
698
+ impl_slicenextdim ! ( ( ) , Slice , Ix1 , Ix1 ) ;
699
699
700
- impl_slicearg ! ( ( ) , NewAxis , Ix0 , Ix1 ) ;
700
+ impl_slicenextdim ! ( ( ) , NewAxis , Ix0 , Ix1 ) ;
701
701
702
702
/// Slice argument constructor.
703
703
///
@@ -801,8 +801,8 @@ macro_rules! s(
801
801
( @parse $in_dim: expr, $out_dim: expr, [ $( $stack: tt) * ] $r: expr; $s: expr) => {
802
802
match $r {
803
803
r => {
804
- let in_dim = $crate:: SliceArg :: next_in_dim( & r, $in_dim) ;
805
- let out_dim = $crate:: SliceArg :: next_out_dim( & r, $out_dim) ;
804
+ let in_dim = $crate:: SliceNextDim :: next_in_dim( & r, $in_dim) ;
805
+ let out_dim = $crate:: SliceNextDim :: next_out_dim( & r, $out_dim) ;
806
806
#[ allow( unsafe_code) ]
807
807
unsafe {
808
808
$crate:: SliceInfo :: new_unchecked(
@@ -818,8 +818,8 @@ macro_rules! s(
818
818
( @parse $in_dim: expr, $out_dim: expr, [ $( $stack: tt) * ] $r: expr) => {
819
819
match $r {
820
820
r => {
821
- let in_dim = $crate:: SliceArg :: next_in_dim( & r, $in_dim) ;
822
- let out_dim = $crate:: SliceArg :: next_out_dim( & r, $out_dim) ;
821
+ let in_dim = $crate:: SliceNextDim :: next_in_dim( & r, $in_dim) ;
822
+ let out_dim = $crate:: SliceNextDim :: next_out_dim( & r, $out_dim) ;
823
823
#[ allow( unsafe_code) ]
824
824
unsafe {
825
825
$crate:: SliceInfo :: new_unchecked(
@@ -844,8 +844,8 @@ macro_rules! s(
844
844
match $r {
845
845
r => {
846
846
$crate:: s![ @parse
847
- $crate:: SliceArg :: next_in_dim( & r, $in_dim) ,
848
- $crate:: SliceArg :: next_out_dim( & r, $out_dim) ,
847
+ $crate:: SliceNextDim :: next_in_dim( & r, $in_dim) ,
848
+ $crate:: SliceNextDim :: next_out_dim( & r, $out_dim) ,
849
849
[ $( $stack) * $crate:: s!( @convert r, $s) , ]
850
850
$( $t) *
851
851
]
@@ -857,8 +857,8 @@ macro_rules! s(
857
857
match $r {
858
858
r => {
859
859
$crate:: s![ @parse
860
- $crate:: SliceArg :: next_in_dim( & r, $in_dim) ,
861
- $crate:: SliceArg :: next_out_dim( & r, $out_dim) ,
860
+ $crate:: SliceNextDim :: next_in_dim( & r, $in_dim) ,
861
+ $crate:: SliceNextDim :: next_out_dim( & r, $out_dim) ,
862
862
[ $( $stack) * $crate:: s!( @convert r) , ]
863
863
$( $t) *
864
864
]
0 commit comments