From b0006dff1041f0eea718ca29607cd6ec372e4e30 Mon Sep 17 00:00:00 2001 From: Alexander Regueiro Date: Thu, 5 Sep 2019 17:15:28 +0100 Subject: A few cosmetic improvements to code & comments in liballoc and libcore --- src/libcore/ptr/mod.rs | 4 ++-- src/libcore/ptr/non_null.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libcore/ptr') diff --git a/src/libcore/ptr/mod.rs b/src/libcore/ptr/mod.rs index f5fbd1a6b13..13ccc9b252a 100644 --- a/src/libcore/ptr/mod.rs +++ b/src/libcore/ptr/mod.rs @@ -1042,7 +1042,7 @@ impl *const T { (self as *const u8) == null() } - /// Cast to a pointer to a different type + /// Casts to a pointer of another type. #[stable(feature = "ptr_cast", since = "1.38.0")] #[inline] pub const fn cast(self) -> *const U { @@ -1726,7 +1726,7 @@ impl *mut T { (self as *mut u8) == null_mut() } - /// Cast to a pointer to a different type + /// Casts to a pointer of another type. #[stable(feature = "ptr_cast", since = "1.38.0")] #[inline] pub const fn cast(self) -> *mut U { diff --git a/src/libcore/ptr/non_null.rs b/src/libcore/ptr/non_null.rs index ad3d1ce396a..7dcd57f1f98 100644 --- a/src/libcore/ptr/non_null.rs +++ b/src/libcore/ptr/non_null.rs @@ -125,7 +125,7 @@ impl NonNull { &mut *self.as_ptr() } - /// Cast to a pointer of another type + /// Casts to a pointer of another type. #[stable(feature = "nonnull_cast", since = "1.27.0")] #[inline] pub const fn cast(self) -> NonNull { -- cgit 1.4.1-3-g733a5