Skip to content

Commit 00716b4

Browse files
committed
Make ptr::eq documentation mention smart-pointer behavior
Resolves #59214
1 parent 0633c55 commit 00716b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libcore/ptr.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2483,6 +2483,10 @@ impl<T: ?Sized> Eq for *mut T {}
24832483
/// by their address rather than comparing the values they point to
24842484
/// (which is what the `PartialEq for &T` implementation does).
24852485
///
2486+
/// Smart pointer types, such as `Box`, `Rc`, and `Arc` do not compare
2487+
/// using this function, instead they compare the values rather than
2488+
/// their addresses.
2489+
///
24862490
/// # Examples
24872491
///
24882492
/// ```

0 commit comments

Comments
 (0)