about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLuxko <liarluxlux@gmail.com>2017-03-20 17:17:10 +0800
committerGitHub <noreply@github.com>2017-03-20 17:17:10 +0800
commitc50a6ec7389e24b00d46232a4a2b13ae0b4c1bc3 (patch)
treed61216c5ad721ac100e86fa37795acd147208b14
parent6738cd4d473668f7af381826d634e573d15e1f11 (diff)
downloadrust-c50a6ec7389e24b00d46232a4a2b13ae0b4c1bc3.tar.gz
rust-c50a6ec7389e24b00d46232a4a2b13ae0b4c1bc3.zip
Fix typo in `ptr` doc
`sizeof` should be `size_of`
-rw-r--r--src/libcore/ptr.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 909e44df20a..07a7d2f95b1 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -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
     ///
@@ -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
     ///
@@ -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
     ///
@@ -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
     ///