@@ -3291,8 +3291,8 @@ impl<'a, T> IterMut<'a, T> {
3291
3291
3292
3292
/// Views the underlying data as a subslice of the original data.
3293
3293
///
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 .
3296
3296
///
3297
3297
/// # Examples
3298
3298
///
@@ -3302,11 +3302,11 @@ impl<'a, T> IterMut<'a, T> {
3302
3302
/// # #![feature(slice_iter_mut_as_slice)]
3303
3303
/// // First, we declare a type which has `iter_mut` method to get the `IterMut`
3304
3304
/// // struct (&[usize here]):
3305
- /// let mut slice = &mut [1, 2, 3];
3305
+ /// let mut slice: &mut [usize] = &mut [1, 2, 3];
3306
3306
///
3307
3307
/// // Then, we get the iterator:
3308
3308
/// 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]":
3310
3310
/// println!("{:?}", iter.as_slice());
3311
3311
/// assert_eq!(iter.as_slice(), &[1, 2, 3]);
3312
3312
///
0 commit comments