Make ptr::eq documentation mention smart-pointer behavior

Resolves #59214
This commit is contained in:
Chris Gregory 2019-03-23 19:43:32 -04:00
parent 0633c55d20
commit 00716b480f

View 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
///
/// ```