diff options
| author | Yuki Okushi <huyuumi.dev+love@gmail.com> | 2022-10-27 08:30:58 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-27 08:30:58 +0900 |
| commit | 77145c042d8a94ab2159af0b624e1297812472fb (patch) | |
| tree | 32932e180d8f9dd2d0f52a5e1dd0fd55821b326b | |
| parent | 1d5f32897a4d717325834984def2cb67ebcb42b3 (diff) | |
| parent | cce46e9ae2b7ead4594e3a009bcca90db1b0b0a6 (diff) | |
| download | rust-77145c042d8a94ab2159af0b624e1297812472fb.tar.gz rust-77145c042d8a94ab2159af0b624e1297812472fb.zip | |
Rollup merge of #103580 - lukas-code:guaranteed_ne, r=GuillaumeGomez
Fix typo in docs for `guaranteed_ne` `==` -> `!=`
| -rw-r--r-- | library/core/src/ptr/const_ptr.rs | 2 | ||||
| -rw-r--r-- | library/core/src/ptr/mut_ptr.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index 67e59460d74..ed16c5f051f 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -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. diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index 0bb2566fd4c..6764002bcd4 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -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. |
