File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4551,7 +4551,7 @@ impl<T> [T] {
4551
4551
4552
4552
/// Returns the index that an element reference points to.
4553
4553
///
4554
- /// Returns `None` if `element` does not point within the slice or if it points between elements .
4554
+ /// Returns `None` if `element` does not point to the start of an element within the slice .
4555
4555
///
4556
4556
/// This method is useful for extending slice iterators like [`slice::split`].
4557
4557
///
@@ -4573,7 +4573,7 @@ impl<T> [T] {
4573
4573
/// assert_eq!(num, &1);
4574
4574
/// assert_eq!(nums.element_offset(num), Some(2));
4575
4575
/// ```
4576
- /// Returning `None` with an in-between element:
4576
+ /// Returning `None` with an unaligned element:
4577
4577
/// ```
4578
4578
/// #![feature(substr_range)]
4579
4579
///
@@ -4612,7 +4612,8 @@ impl<T> [T] {
4612
4612
4613
4613
/// Returns the range of indices that a subslice points to.
4614
4614
///
4615
- /// Returns `None` if `subslice` does not point within the slice or if it points between elements.
4615
+ /// Returns `None` if `subslice` does not point within the slice or if it is not aligned with the
4616
+ /// elements in the slice.
4616
4617
///
4617
4618
/// This method **does not compare elements**. Instead, this method finds the location in the slice that
4618
4619
/// `subslice` was obtained from. To find the index of a subslice via comparison, instead use
You can’t perform that action at this time.
0 commit comments