about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorChris Gregory <czipperz@gmail.com>2019-03-23 19:43:32 -0400
committerChris Gregory <czipperz@gmail.com>2019-03-23 19:43:32 -0400
commit00716b480fa8fbbfc0a3d64b908cafe7141b1f09 (patch)
tree14e72ec2327848747048df5919da66f9a4c70be3 /src
parent0633c55d2030969d91b57142b8582c53101e6339 (diff)
downloadrust-00716b480fa8fbbfc0a3d64b908cafe7141b1f09.tar.gz
rust-00716b480fa8fbbfc0a3d64b908cafe7141b1f09.zip
Make `ptr::eq` documentation mention smart-pointer behavior
Resolves #59214
Diffstat (limited to 'src')
-rw-r--r--src/libcore/ptr.rs4
1 files changed, 4 insertions, 0 deletions
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<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
 ///
 /// ```