Rollup merge of #40667 - DaseinPhaos:patch-4, r=GuillaumeGomez

Fix typo in `ptr` doc

`sizeof` should be `size_of`
This commit is contained in:
Corey Farwell
2017-03-20 23:45:01 -04:00
committed by GitHub

View File

@@ -434,7 +434,7 @@ impl<T: ?Sized> *const T {
} }
/// Calculates the offset from a pointer. `count` is in units of T; e.g. a /// 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 /// # Safety
/// ///
@@ -464,7 +464,7 @@ impl<T: ?Sized> *const T {
/// Calculates the offset from a pointer using wrapping arithmetic. /// Calculates the offset from a pointer using wrapping arithmetic.
/// `count` is in units of T; e.g. a `count` of 3 represents a pointer /// `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 /// # Safety
/// ///
@@ -558,7 +558,7 @@ impl<T: ?Sized> *mut T {
} }
/// Calculates the offset from a pointer. `count` is in units of T; e.g. a /// 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 /// # Safety
/// ///
@@ -587,7 +587,7 @@ impl<T: ?Sized> *mut T {
/// Calculates the offset from a pointer using wrapping arithmetic. /// Calculates the offset from a pointer using wrapping arithmetic.
/// `count` is in units of T; e.g. a `count` of 3 represents a pointer /// `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 /// # Safety
/// ///