From 307804a00d191b6f15d1a1a5b98fbae5ea6593b0 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Sun, 25 Aug 2019 13:02:45 +0200 Subject: [PATCH] Update {rc, sync}::Weak::ptr_eq doc about comparing Weak::new --- src/liballoc/rc.rs | 5 +++-- src/liballoc/sync.rs | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 1752c1342c8..a10f7c60031 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -1832,8 +1832,9 @@ impl Weak { } } - /// Returns `true` if the two `Weak`s point to the same value (not just values - /// that compare as equal). + /// Returns `true` if the two `Weak`s point to the same value (not just + /// values that compare as equal), or if both don't point to any value + /// (because they were created with `Weak::new()`). /// /// # Notes /// diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs index e89433d67bd..716d750915e 100644 --- a/src/liballoc/sync.rs +++ b/src/liballoc/sync.rs @@ -1550,15 +1550,15 @@ impl Weak { } } - /// Returns `true` if the two `Weak`s point to the same value (not just values - /// that compare as equal). + /// Returns `true` if the two `Weak`s point to the same value (not just + /// values that compare as equal), or if both don't point to any value + /// (because they were created with `Weak::new()`). /// /// # Notes /// /// Since this compares pointers it means that `Weak::new()` will equal each /// other, even though they don't point to any value. /// - /// /// # Examples /// /// ```