diff options
| author | Kevin Reid <kpreid@switchb.org> | 2024-10-09 12:53:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-09 12:53:03 -0700 |
| commit | 5280f152b0dad9faf33478a06c6a1cdf97b71ae4 (patch) | |
| tree | a537a938677bc67045afdbcdd0f20b475b99de63 | |
| parent | 8e2ac498f4e8240c21f1e4ed9ed8c2370a5913f7 (diff) | |
| download | rust-5280f152b0dad9faf33478a06c6a1cdf97b71ae4.tar.gz rust-5280f152b0dad9faf33478a06c6a1cdf97b71ae4.zip | |
Add "not guaranteed to be equal"
Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com>
| -rw-r--r-- | library/core/src/ptr/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 5ee2419591d..dfe28aa7756 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -2180,7 +2180,7 @@ pub fn addr_eq<T: ?Sized, U: ?Sized>(p: *const T, q: *const U) -> bool { /// let f: fn(i32) -> i32 = |x| x; /// let g: fn(i32) -> i32 = |x| x + 0; // different closure, different body /// let h: fn(u32) -> u32 = |x| x + 0; // different signature too -/// dbg!(std::ptr::fn_addr_eq(f, g), std::ptr::fn_addr_eq(f, h)); +/// dbg!(std::ptr::fn_addr_eq(f, g), std::ptr::fn_addr_eq(f, h)); // not guaranteed to be equal /// ``` /// /// * May return `false` in any case. |
