@@ -3291,8 +3291,8 @@ impl<'a, T> IterMut<'a, T> {
32913291
32923292 /// Views the underlying data as a subslice of the original data.
32933293 ///
3294- /// To avoid creating `&mut` references that alias, this has a
3295- /// borrowed lifetime from the iterator.
3294+ /// To avoid creating `&mut [T] ` references that alias, the returned slice
3295+ /// borrows its lifetime from the iterator the method is applied on .
32963296 ///
32973297 /// # Examples
32983298 ///
@@ -3302,11 +3302,11 @@ impl<'a, T> IterMut<'a, T> {
33023302 /// # #![feature(slice_iter_mut_as_slice)]
33033303 /// // First, we declare a type which has `iter_mut` method to get the `IterMut`
33043304 /// // struct (&[usize here]):
3305- /// let mut slice = &mut [1, 2, 3];
3305+ /// let mut slice: &mut [usize] = &mut [1, 2, 3];
33063306 ///
33073307 /// // Then, we get the iterator:
33083308 /// let mut iter = slice.iter_mut();
3309- /// // So if we print what `as_slice` method returns here, we have "[1, 2, 3]":
3309+ /// // So if we print what the `as_slice` method returns here, we have "[1, 2, 3]":
33103310 /// println!("{:?}", iter.as_slice());
33113311 /// assert_eq!(iter.as_slice(), &[1, 2, 3]);
33123312 ///
0 commit comments