Skip to content

Commit

Permalink
Add "not guaranteed to be equal"
Browse files Browse the repository at this point in the history
Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com>
  • Loading branch information
kpreid and Urgau authored Oct 9, 2024
1 parent 7e225fa commit 8cdea8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8cdea8c

Please sign in to comment.