@@ -310,11 +310,13 @@ pub trait DimensionExt {
310310 /// Get the dimension at `axis`.
311311 ///
312312 /// *Panics* if `axis` is out of bounds.
313+ #[ track_caller]
313314 fn axis ( & self , axis : Axis ) -> Ix ;
314315
315316 /// Set the dimension at `axis`.
316317 ///
317318 /// *Panics* if `axis` is out of bounds.
319+ #[ track_caller]
318320 fn set_axis ( & mut self , axis : Axis , value : Ix ) ;
319321}
320322
@@ -349,6 +351,7 @@ impl DimensionExt for [Ix] {
349351/// available.
350352///
351353/// **Panics** if `index` is larger than the size of the axis
354+ #[ track_caller]
352355// FIXME: Move to Dimension trait
353356pub fn do_collapse_axis < D : Dimension > (
354357 dims : & mut D ,
@@ -385,6 +388,7 @@ pub fn abs_index(len: Ix, index: Ixs) -> Ix {
385388/// The return value is (start, end, step).
386389///
387390/// **Panics** if stride is 0 or if any index is out of bounds.
391+ #[ track_caller]
388392fn to_abs_slice ( axis_len : usize , slice : Slice ) -> ( usize , usize , isize ) {
389393 let Slice { start, end, step } = slice;
390394 let start = abs_index ( axis_len, start) ;
@@ -426,6 +430,7 @@ pub fn offset_from_low_addr_ptr_to_logical_ptr<D: Dimension>(dim: &D, strides: &
426430/// Modify dimension, stride and return data pointer offset
427431///
428432/// **Panics** if stride is 0 or if any index is out of bounds.
433+ #[ track_caller]
429434pub fn do_slice ( dim : & mut usize , stride : & mut usize , slice : Slice ) -> isize {
430435 let ( start, end, step) = to_abs_slice ( * dim, slice) ;
431436
0 commit comments