Skip to content

Commit 3124410

Browse files
authored
Allow macro ndarray::s! in no_std. (#1154)
1 parent a7d1fd6 commit 3124410

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/slice.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -842,14 +842,14 @@ macro_rules! s(
842842
}
843843
};
844844
// empty call, i.e. `s![]`
845-
(@parse ::std::marker::PhantomData::<$crate::Ix0>, ::std::marker::PhantomData::<$crate::Ix0>, []) => {
845+
(@parse ::core::marker::PhantomData::<$crate::Ix0>, ::core::marker::PhantomData::<$crate::Ix0>, []) => {
846846
{
847847
#[allow(unsafe_code)]
848848
unsafe {
849849
$crate::SliceInfo::new_unchecked(
850850
[],
851-
::std::marker::PhantomData::<$crate::Ix0>,
852-
::std::marker::PhantomData::<$crate::Ix0>,
851+
::core::marker::PhantomData::<$crate::Ix0>,
852+
::core::marker::PhantomData::<$crate::Ix0>,
853853
)
854854
}
855855
}
@@ -858,18 +858,18 @@ macro_rules! s(
858858
(@parse $($t:tt)*) => { compile_error!("Invalid syntax in s![] call.") };
859859
// convert range/index/new-axis into SliceInfoElem
860860
(@convert $r:expr) => {
861-
<$crate::SliceInfoElem as ::std::convert::From<_>>::from($r)
861+
<$crate::SliceInfoElem as ::core::convert::From<_>>::from($r)
862862
};
863863
// convert range/index/new-axis and step into SliceInfoElem
864864
(@convert $r:expr, $s:expr) => {
865-
<$crate::SliceInfoElem as ::std::convert::From<_>>::from(
866-
<$crate::Slice as ::std::convert::From<_>>::from($r).step_by($s as isize)
865+
<$crate::SliceInfoElem as ::core::convert::From<_>>::from(
866+
<$crate::Slice as ::core::convert::From<_>>::from($r).step_by($s as isize)
867867
)
868868
};
869869
($($t:tt)*) => {
870870
$crate::s![@parse
871-
::std::marker::PhantomData::<$crate::Ix0>,
872-
::std::marker::PhantomData::<$crate::Ix0>,
871+
::core::marker::PhantomData::<$crate::Ix0>,
872+
::core::marker::PhantomData::<$crate::Ix0>,
873873
[]
874874
$($t)*
875875
]

0 commit comments

Comments
 (0)