Skip to content

Commit cce46e9

Browse files
author
Lukas Markeffsky
committed
Fix typo in docs for guaranteed_ne
1 parent 542febd commit cce46e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/core/src/ptr/const_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ impl<T: ?Sized> *const T {
802802

803803
/// Returns whether two pointers are guaranteed to be inequal.
804804
///
805-
/// At runtime this function behaves like `Some(self == other)`.
805+
/// At runtime this function behaves like `Some(self != other)`.
806806
/// However, in some contexts (e.g., compile-time evaluation),
807807
/// it is not always possible to determine inequality of two pointers, so this function may
808808
/// spuriously return `None` for pointers that later actually turn out to have its inequality known.

library/core/src/ptr/mut_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ impl<T: ?Sized> *mut T {
726726

727727
/// Returns whether two pointers are guaranteed to be inequal.
728728
///
729-
/// At runtime this function behaves like `Some(self == other)`.
729+
/// At runtime this function behaves like `Some(self != other)`.
730730
/// However, in some contexts (e.g., compile-time evaluation),
731731
/// it is not always possible to determine inequality of two pointers, so this function may
732732
/// spuriously return `None` for pointers that later actually turn out to have its inequality known.

0 commit comments

Comments
 (0)