Skip to content

Commit

Permalink
Rollup merge of rust-lang#40667 - DaseinPhaos:patch-4, r=GuillaumeGomez
Browse files Browse the repository at this point in the history
Fix typo in `ptr` doc

`sizeof` should be `size_of`
  • Loading branch information
frewsxcv authored Mar 20, 2017
2 parents da08827 + c50a6ec commit a3ed87c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ impl<T: ?Sized> *const T {
}

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

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

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

/// Calculates the offset from a pointer using wrapping arithmetic.
/// `count` is in units of T; e.g. a `count` of 3 represents a pointer
/// offset of `3 * sizeof::<T>()` bytes.
/// offset of `3 * size_of::<T>()` bytes.
///
/// # Safety
///
Expand Down

0 comments on commit a3ed87c

Please sign in to comment.