about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorTshepang Lekhonkhobe <tshepang@gmail.com>2016-04-06 06:24:19 +0200
committerTshepang Lekhonkhobe <tshepang@gmail.com>2016-04-06 06:24:19 +0200
commit922e666820fef2f5d9bd7fa450b4a45d85fdd84a (patch)
tree776d4a9606663580bbc2c944b3270b98d2d98d41 /src/libcore
parent7ded11a58cf2f8037a511a8d340161c59fba9913 (diff)
downloadrust-922e666820fef2f5d9bd7fa450b4a45d85fdd84a.tar.gz
rust-922e666820fef2f5d9bd7fa450b4a45d85fdd84a.zip
avoid "==" in assert! when one of the values is a bool
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/ptr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 37e9d18095f..42aef3ab3dd 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -220,7 +220,7 @@ impl<T: ?Sized> *const T {
     /// ```
     /// let s: &str = "Follow the rabbit";
     /// let ptr: *const u8 = s.as_ptr();
-    /// assert!(ptr.is_null() == false);
+    /// assert!(!ptr.is_null());
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]
@@ -306,7 +306,7 @@ impl<T: ?Sized> *mut T {
     /// ```
     /// let mut s = [1, 2, 3];
     /// let ptr: *mut u32 = s.as_mut_ptr();
-    /// assert!(ptr.is_null() == false);
+    /// assert!(!ptr.is_null());
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]