Skip to content

Commit 39796bd

Browse files
Rollup merge of #103580 - lukas-code:guaranteed_ne, r=GuillaumeGomez
Fix typo in docs for `guaranteed_ne` `==` -> `!=`
2 parents 2f21ead + cce46e9 commit 39796bd

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
@@ -730,7 +730,7 @@ impl<T: ?Sized> *mut T {
730730

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

0 commit comments

Comments
 (0)