Skip to content

Commit d0c04fb

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

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/ptr.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ impl<T: ?Sized> *const T {
434434
}
435435

436436
/// Calculates the offset from a pointer. `count` is in units of T; e.g. a
437-
/// `count` of 3 represents a pointer offset of `3 * sizeof::<T>()` bytes.
437+
/// `count` of 3 represents a pointer offset of `3 * size_of::<T>()` bytes.
438438
///
439439
/// # Safety
440440
///
@@ -464,7 +464,7 @@ impl<T: ?Sized> *const T {
464464

465465
/// Calculates the offset from a pointer using wrapping arithmetic.
466466
/// `count` is in units of T; e.g. a `count` of 3 represents a pointer
467-
/// offset of `3 * sizeof::<T>()` bytes.
467+
/// offset of `3 * size_of::<T>()` bytes.
468468
///
469469
/// # Safety
470470
///
@@ -558,7 +558,7 @@ impl<T: ?Sized> *mut T {
558558
}
559559

560560
/// Calculates the offset from a pointer. `count` is in units of T; e.g. a
561-
/// `count` of 3 represents a pointer offset of `3 * sizeof::<T>()` bytes.
561+
/// `count` of 3 represents a pointer offset of `3 * size_of::<T>()` bytes.
562562
///
563563
/// # Safety
564564
///
@@ -587,7 +587,7 @@ impl<T: ?Sized> *mut T {
587587

588588
/// Calculates the offset from a pointer using wrapping arithmetic.
589589
/// `count` is in units of T; e.g. a `count` of 3 represents a pointer
590-
/// offset of `3 * sizeof::<T>()` bytes.
590+
/// offset of `3 * size_of::<T>()` bytes.
591591
///
592592
/// # Safety
593593
///

0 commit comments

Comments
 (0)