File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1099,12 +1099,11 @@ impl<T> [T] {
10991099 /// assert!(iter.next().is_none());
11001100 /// ```
11011101 ///
1102- /// Because the [Iterator] trait cannot represent the required lifetimes, there is no `windows_mut` analog to `windows`.
1103- /// (If there was, then `[0,1,2].windows_mut(2).collect()` would create 2 mutable references
1104- /// to the middle element of that array, which would violate [the rules of references],
1105- /// though a [LendingIterator] analog is possible.)
1106- /// However, you can sometimes use [`Cell::as_slice_of_cells`](crate::cell::Cell::as_slice_of_cells) in
1107- /// conjunction with `windows` to accomplish something similar:
1102+ /// Because the [Iterator] trait cannot represent the required lifetimes, there is no `windows_mut` analog to `windows`;
1103+ /// `[0,1,2].windows_mut(2).collect()` would violate [the rules of references]
1104+ /// (though a [LendingIterator] analog is possible).
1105+ /// You can sometimes use [`Cell::as_slice_of_cells`](crate::cell::Cell::as_slice_of_cells) in
1106+ /// conjunction with `windows` instead:
11081107 ///
11091108 /// [the rules of references]: https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#the-rules-of-references
11101109 /// [LendingIterator]: https://blog.rust-lang.org/2022/10/28/gats-stabilization.html
You can’t perform that action at this time.
0 commit comments