Skip to content

Commit a3ed87c

Browse files
authored
Rollup merge of #40667 - DaseinPhaos:patch-4, r=GuillaumeGomez
Fix typo in `ptr` doc `sizeof` should be `size_of`
2 parents da08827 + c50a6ec commit a3ed87c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/ptr.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ impl<T: ?Sized> *const T {
405405
}
406406

407407
/// Calculates the offset from a pointer. `count` is in units of T; e.g. a
408-
/// `count` of 3 represents a pointer offset of `3 * sizeof::<T>()` bytes.
408+
/// `count` of 3 represents a pointer offset of `3 * size_of::<T>()` bytes.
409409
///
410410
/// # Safety
411411
///
@@ -435,7 +435,7 @@ impl<T: ?Sized> *const T {
435435

436436
/// Calculates the offset from a pointer using wrapping arithmetic.
437437
/// `count` is in units of T; e.g. a `count` of 3 represents a pointer
438-
/// offset of `3 * sizeof::<T>()` bytes.
438+
/// offset of `3 * size_of::<T>()` bytes.
439439
///
440440
/// # Safety
441441
///
@@ -529,7 +529,7 @@ impl<T: ?Sized> *mut T {
529529
}
530530

531531
/// Calculates the offset from a pointer. `count` is in units of T; e.g. a
532-
/// `count` of 3 represents a pointer offset of `3 * sizeof::<T>()` bytes.
532+
/// `count` of 3 represents a pointer offset of `3 * size_of::<T>()` bytes.
533533
///
534534
/// # Safety
535535
///
@@ -558,7 +558,7 @@ impl<T: ?Sized> *mut T {
558558

559559
/// Calculates the offset from a pointer using wrapping arithmetic.
560560
/// `count` is in units of T; e.g. a `count` of 3 represents a pointer
561-
/// offset of `3 * sizeof::<T>()` bytes.
561+
/// offset of `3 * size_of::<T>()` bytes.
562562
///
563563
/// # Safety
564564
///

0 commit comments

Comments
 (0)