]> git.lizzy.rs Git - rust.git/commitdiff
Make `ptr::eq` documentation mention smart-pointer behavior
authorChris Gregory <czipperz@gmail.com>
Sat, 23 Mar 2019 23:43:32 +0000 (19:43 -0400)
committerChris Gregory <czipperz@gmail.com>
Sat, 23 Mar 2019 23:43:32 +0000 (19:43 -0400)
Resolves #59214

src/libcore/ptr.rs

index a9a029d606d6f84315931b1b69381dfe663c1de4..c9f1a87ba9ff21efef6a6bab082ee73044208df3 100644 (file)
@@ -2483,6 +2483,10 @@ impl<T: ?Sized> Eq for *mut T {}
 /// by their address rather than comparing the values they point to
 /// (which is what the `PartialEq for &T` implementation does).
 ///
+/// Smart pointer types, such as `Box`, `Rc`, and `Arc` do not compare
+/// using this function, instead they compare the values rather than
+/// their addresses.
+///
 /// # Examples
 ///
 /// ```