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 @@ -4641,7 +4641,7 @@ impl<T> [T] {
46414641
46424642 /// Returns the index that an element reference points to.
46434643 ///
4644- /// Returns `None` if `element` does not point within the slice or if it points between elements .
4644+ /// Returns `None` if `element` does not point to the start of an element within the slice .
46454645 ///
46464646 /// This method is useful for extending slice iterators like [`slice::split`].
46474647 ///
@@ -4663,7 +4663,7 @@ impl<T> [T] {
46634663 /// assert_eq!(num, &1);
46644664 /// assert_eq!(nums.element_offset(num), Some(2));
46654665 /// ```
4666- /// Returning `None` with an in-between element:
4666+ /// Returning `None` with an unaligned element:
46674667 /// ```
46684668 /// #![feature(substr_range)]
46694669 ///
@@ -4702,7 +4702,8 @@ impl<T> [T] {
47024702
47034703 /// Returns the range of indices that a subslice points to.
47044704 ///
4705- /// Returns `None` if `subslice` does not point within the slice or if it points between elements.
4705+ /// Returns `None` if `subslice` does not point within the slice or if it is not aligned with the
4706+ /// elements in the slice.
47064707 ///
47074708 /// This method **does not compare elements**. Instead, this method finds the location in the slice that
47084709 /// `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