From 00716b480fa8fbbfc0a3d64b908cafe7141b1f09 Mon Sep 17 00:00:00 2001 From: Chris Gregory Date: Sat, 23 Mar 2019 19:43:32 -0400 Subject: [PATCH] Make `ptr::eq` documentation mention smart-pointer behavior Resolves #59214 --- src/libcore/ptr.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index a9a029d606d..c9f1a87ba9f 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -2483,6 +2483,10 @@ impl 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 /// /// ``` -- 2.44.0