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 @@ -4533,7 +4533,7 @@ impl<T> [T] {
45334533
45344534 /// Returns the index that an element reference points to.
45354535 ///
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 .
45374537 ///
45384538 /// This method is useful for extending slice iterators like [`slice::split`].
45394539 ///
@@ -4555,7 +4555,7 @@ impl<T> [T] {
45554555 /// assert_eq!(num, &1);
45564556 /// assert_eq!(nums.element_offset(num), Some(2));
45574557 /// ```
4558- /// Returning `None` with an in-between element:
4558+ /// Returning `None` with an unaligned element:
45594559 /// ```
45604560 /// #![feature(substr_range)]
45614561 ///
@@ -4594,7 +4594,8 @@ impl<T> [T] {
45944594
45954595 /// Returns the range of indices that a subslice points to.
45964596 ///
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.
45984599 ///
45994600 /// This method **does not compare elements**. Instead, this method finds the location in the slice that
46004601 /// `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