Skip to content

Commit

Permalink
Fix typo in ptr doc
Browse files Browse the repository at this point in the history
`sizeof` should be `size_of`
  • Loading branch information
DaseinPhaos committed Mar 20, 2017
1 parent 6738cd4 commit c50a6ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libcore/ptr.rs
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 c50a6ec

Please sign in to comment.