@@ -1178,7 +1178,7 @@ impl<'a, T> Iterator for Windows<'a, T> {
11781178 }
11791179
11801180 #[ doc( hidden) ]
1181- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1181+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
11821182 // SAFETY: since the caller guarantees that `i` is in bounds,
11831183 // which means that `i` cannot overflow an `isize`, and the
11841184 // slice created by `from_raw_parts` is a subslice of `self.v`
@@ -1324,7 +1324,7 @@ impl<'a, T> Iterator for Chunks<'a, T> {
13241324 }
13251325
13261326 #[ doc( hidden) ]
1327- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1327+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
13281328 let start = idx * self . chunk_size ;
13291329 let end = match start. checked_add ( self . chunk_size ) {
13301330 None => self . v . len ( ) ,
@@ -1480,13 +1480,13 @@ impl<'a, T> Iterator for ChunksMut<'a, T> {
14801480 }
14811481
14821482 #[ doc( hidden) ]
1483- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1483+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
14841484 let start = idx * self . chunk_size ;
14851485 let end = match start. checked_add ( self . chunk_size ) {
14861486 None => self . v . len ( ) ,
14871487 Some ( end) => cmp:: min ( end, self . v . len ( ) ) ,
14881488 } ;
1489- // SAFETY: see comments for `Chunks::get_unchecked `.
1489+ // SAFETY: see comments for `Chunks::__iterator_get_unchecked `.
14901490 //
14911491 // Also note that the caller also guarantees that we're never called
14921492 // with the same index again, and that no other methods that will
@@ -1642,9 +1642,9 @@ impl<'a, T> Iterator for ChunksExact<'a, T> {
16421642 }
16431643
16441644 #[ doc( hidden) ]
1645- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1645+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
16461646 let start = idx * self . chunk_size ;
1647- // SAFETY: mostly identical to `Chunks::get_unchecked `.
1647+ // SAFETY: mostly identical to `Chunks::__iterator_get_unchecked `.
16481648 unsafe { from_raw_parts ( self . v . as_ptr ( ) . add ( start) , self . chunk_size ) }
16491649 }
16501650}
@@ -1785,9 +1785,9 @@ impl<'a, T> Iterator for ChunksExactMut<'a, T> {
17851785 }
17861786
17871787 #[ doc( hidden) ]
1788- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
1788+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
17891789 let start = idx * self . chunk_size ;
1790- // SAFETY: see comments for `ChunksMut::get_unchecked `.
1790+ // SAFETY: see comments for `ChunksMut::__iterator_get_unchecked `.
17911791 unsafe { from_raw_parts_mut ( self . v . as_mut_ptr ( ) . add ( start) , self . chunk_size ) }
17921792 }
17931793}
@@ -2030,10 +2030,10 @@ impl<'a, T, const N: usize> Iterator for ArrayChunks<'a, T, N> {
20302030 self . iter . last ( )
20312031 }
20322032
2033- unsafe fn get_unchecked ( & mut self , i : usize ) -> & ' a [ T ; N ] {
2034- // SAFETY: The safety guarantees of `get_unchecked ` are transferred to
2035- // the caller.
2036- unsafe { self . iter . get_unchecked ( i) }
2033+ unsafe fn __iterator_get_unchecked ( & mut self , i : usize ) -> & ' a [ T ; N ] {
2034+ // SAFETY: The safety guarantees of `__iterator_get_unchecked ` are
2035+ // transferred to the caller.
2036+ unsafe { self . iter . __iterator_get_unchecked ( i) }
20372037 }
20382038}
20392039
@@ -2141,10 +2141,10 @@ impl<'a, T, const N: usize> Iterator for ArrayChunksMut<'a, T, N> {
21412141 self . iter . last ( )
21422142 }
21432143
2144- unsafe fn get_unchecked ( & mut self , i : usize ) -> & ' a mut [ T ; N ] {
2145- // SAFETY: The safety guarantees of `get_unchecked ` are transferred to
2144+ unsafe fn __iterator_get_unchecked ( & mut self , i : usize ) -> & ' a mut [ T ; N ] {
2145+ // SAFETY: The safety guarantees of `__iterator_get_unchecked ` are transferred to
21462146 // the caller.
2147- unsafe { self . iter . get_unchecked ( i) }
2147+ unsafe { self . iter . __iterator_get_unchecked ( i) }
21482148 }
21492149}
21502150
@@ -2278,13 +2278,13 @@ impl<'a, T> Iterator for RChunks<'a, T> {
22782278 }
22792279
22802280 #[ doc( hidden) ]
2281- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
2281+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
22822282 let end = self . v . len ( ) - idx * self . chunk_size ;
22832283 let start = match end. checked_sub ( self . chunk_size ) {
22842284 None => 0 ,
22852285 Some ( start) => start,
22862286 } ;
2287- // SAFETY: mostly identical to `Chunks::get_unchecked `.
2287+ // SAFETY: mostly identical to `Chunks::__iterator_get_unchecked `.
22882288 unsafe { from_raw_parts ( self . v . as_ptr ( ) . add ( start) , end - start) }
22892289 }
22902290}
@@ -2431,13 +2431,14 @@ impl<'a, T> Iterator for RChunksMut<'a, T> {
24312431 }
24322432
24332433 #[ doc( hidden) ]
2434- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
2434+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
24352435 let end = self . v . len ( ) - idx * self . chunk_size ;
24362436 let start = match end. checked_sub ( self . chunk_size ) {
24372437 None => 0 ,
24382438 Some ( start) => start,
24392439 } ;
2440- // SAFETY: see comments for `RChunks::get_unchecked` and `ChunksMut::get_unchecked`
2440+ // SAFETY: see comments for `RChunks::__iterator_get_unchecked` and
2441+ // `ChunksMut::__iterator_get_unchecked`
24412442 unsafe { from_raw_parts_mut ( self . v . as_mut_ptr ( ) . add ( start) , end - start) }
24422443 }
24432444}
@@ -2585,11 +2586,11 @@ impl<'a, T> Iterator for RChunksExact<'a, T> {
25852586 }
25862587
25872588 #[ doc( hidden) ]
2588- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
2589+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
25892590 let end = self . v . len ( ) - idx * self . chunk_size ;
25902591 let start = end - self . chunk_size ;
25912592 // SAFETY:
2592- // SAFETY: mostmy identical to `Chunks::get_unchecked `.
2593+ // SAFETY: mostmy identical to `Chunks::__iterator_get_unchecked `.
25932594 unsafe { from_raw_parts ( self . v . as_ptr ( ) . add ( start) , self . chunk_size ) }
25942595 }
25952596}
@@ -2734,10 +2735,10 @@ impl<'a, T> Iterator for RChunksExactMut<'a, T> {
27342735 }
27352736
27362737 #[ doc( hidden) ]
2737- unsafe fn get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
2738+ unsafe fn __iterator_get_unchecked ( & mut self , idx : usize ) -> Self :: Item {
27382739 let end = self . v . len ( ) - idx * self . chunk_size ;
27392740 let start = end - self . chunk_size ;
2740- // SAFETY: see comments for `RChunksMut::get_unchecked `.
2741+ // SAFETY: see comments for `RChunksMut::__iterator_get_unchecked `.
27412742 unsafe { from_raw_parts_mut ( self . v . as_mut_ptr ( ) . add ( start) , self . chunk_size ) }
27422743 }
27432744}
0 commit comments