We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99a74af commit 1946a18Copy full SHA for 1946a18
library/core/src/ptr/mod.rs
@@ -1733,6 +1733,7 @@ pub(crate) unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usize {
1733
/// by their address rather than comparing the values they point to
1734
/// (which is what the `PartialEq for &T` implementation does).
1735
///
1736
+/// When comparing wide pointers, both the address and the metadata are tested for equality.
1737
/// However, note that comparing trait object pointers (`*const dyn Trait`) is unrealiable: pointers
1738
/// to values of the same underlying type can compare inequal (because vtables are duplicated in
1739
/// multiple codegen units), and pointers to values of *different* underlying type can compare equal
0 commit comments