Skip to content

Commit 1ed90e4

Browse files
authored
Rollup merge of #80791 - mrcz:master, r=jyn514
Fix type name in doc example for Iter and IterMut
2 parents f6c58af + 358ef56 commit 1ed90e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/core/src/slice/iter.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn size_from_ptr<T>(_: *const T) -> usize {
5151
/// Basic usage:
5252
///
5353
/// ```
54-
/// // First, we declare a type which has `iter` method to get the `Iter` struct (&[usize here]):
54+
/// // First, we declare a type which has `iter` method to get the `Iter` struct (`&[usize]` here):
5555
/// let slice = &[1, 2, 3];
5656
///
5757
/// // Then, we iterate over it:
@@ -112,7 +112,7 @@ impl<'a, T> Iter<'a, T> {
112112
///
113113
/// ```
114114
/// // First, we declare a type which has the `iter` method to get the `Iter`
115-
/// // struct (&[usize here]):
115+
/// // struct (`&[usize]` here):
116116
/// let slice = &[1, 2, 3];
117117
///
118118
/// // Then, we get the iterator:
@@ -167,7 +167,7 @@ impl<T> AsRef<[T]> for Iter<'_, T> {
167167
///
168168
/// ```
169169
/// // First, we declare a type which has `iter_mut` method to get the `IterMut`
170-
/// // struct (&[usize here]):
170+
/// // struct (`&[usize]` here):
171171
/// let mut slice = &mut [1, 2, 3];
172172
///
173173
/// // Then, we iterate over it and increment each element value:
@@ -246,7 +246,7 @@ impl<'a, T> IterMut<'a, T> {
246246
///
247247
/// ```
248248
/// // First, we declare a type which has `iter_mut` method to get the `IterMut`
249-
/// // struct (&[usize here]):
249+
/// // struct (`&[usize]` here):
250250
/// let mut slice = &mut [1, 2, 3];
251251
///
252252
/// {

0 commit comments

Comments
 (0)