Skip to content

Commit 7b09e1c

Browse files
committed
improve primitive reference PartialEq docs
This sentence was unnecessarily complex; try to simplify it.
1 parent 2636cb4 commit 7b09e1c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

library/core/src/primitive_docs.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,9 +1531,8 @@ mod prim_usize {}
15311531
/// `&mut T` references can be freely coerced into `&T` references with the same referent type, and
15321532
/// references with longer lifetimes can be freely coerced into references with shorter ones.
15331533
///
1534-
/// Reference equality by address, instead of comparing the values pointed to, is accomplished via
1535-
/// implicit reference-pointer coercion and raw pointer equality via [`ptr::eq`], while
1536-
/// [`PartialEq`] compares values.
1534+
/// [`PartialEq`] will compare referenced values. It is possible to compare the reference address
1535+
/// using reference-pointer coercion and raw pointer equality via [`ptr::eq`].
15371536
///
15381537
/// ```
15391538
/// use std::ptr;

0 commit comments

Comments
 (0)