Rollup merge of #103580 - lukas-code:guaranteed_ne, r=GuillaumeGomez

Fix typo in docs for `guaranteed_ne`

`==` -> `!=`
This commit is contained in:
Yuki Okushi 2022-10-27 08:30:58 +09:00 committed by GitHub
commit 77145c042d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -802,7 +802,7 @@ impl<T: ?Sized> *const T {
/// Returns whether two pointers are guaranteed to be inequal.
///
/// At runtime this function behaves like `Some(self == other)`.
/// At runtime this function behaves like `Some(self != other)`.
/// However, in some contexts (e.g., compile-time evaluation),
/// it is not always possible to determine inequality of two pointers, so this function may
/// spuriously return `None` for pointers that later actually turn out to have its inequality known.

View File

@ -730,7 +730,7 @@ impl<T: ?Sized> *mut T {
/// Returns whether two pointers are guaranteed to be inequal.
///
/// At runtime this function behaves like `Some(self == other)`.
/// At runtime this function behaves like `Some(self != other)`.
/// However, in some contexts (e.g., compile-time evaluation),
/// it is not always possible to determine inequality of two pointers, so this function may
/// spuriously return `None` for pointers that later actually turn out to have its inequality known.