File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4533,7 +4533,7 @@ impl<T> [T] {
4533
4533
4534
4534
/// Returns the index that an element reference points to.
4535
4535
///
4536
- /// Returns `None` if `element` does not point within the slice or if it points between elements .
4536
+ /// Returns `None` if `element` does not point to the start of an element within the slice .
4537
4537
///
4538
4538
/// This method is useful for extending slice iterators like [`slice::split`].
4539
4539
///
@@ -4555,7 +4555,7 @@ impl<T> [T] {
4555
4555
/// assert_eq!(num, &1);
4556
4556
/// assert_eq!(nums.element_offset(num), Some(2));
4557
4557
/// ```
4558
- /// Returning `None` with an in-between element:
4558
+ /// Returning `None` with an unaligned element:
4559
4559
/// ```
4560
4560
/// #![feature(substr_range)]
4561
4561
///
@@ -4594,7 +4594,8 @@ impl<T> [T] {
4594
4594
4595
4595
/// Returns the range of indices that a subslice points to.
4596
4596
///
4597
- /// Returns `None` if `subslice` does not point within the slice or if it points between elements.
4597
+ /// Returns `None` if `subslice` does not point within the slice or if it is not aligned with the
4598
+ /// elements in the slice.
4598
4599
///
4599
4600
/// This method **does not compare elements**. Instead, this method finds the location in the slice that
4600
4601
/// `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