diff options
| author | Thomas de Zeeuw <thomasdezeeuw@gmail.com> | 2019-08-25 13:02:45 +0200 |
|---|---|---|
| committer | Thomas de Zeeuw <thomasdezeeuw@gmail.com> | 2019-08-25 13:07:54 +0200 |
| commit | 307804a00d191b6f15d1a1a5b98fbae5ea6593b0 (patch) | |
| tree | edd092a1993802c87c7de4a1d2fa05fc5b39f553 /src/liballoc | |
| parent | d86516d91e643fd87eadf057096989ce454f4d81 (diff) | |
| download | rust-307804a00d191b6f15d1a1a5b98fbae5ea6593b0.tar.gz rust-307804a00d191b6f15d1a1a5b98fbae5ea6593b0.zip | |
Update {rc, sync}::Weak::ptr_eq doc about comparing Weak::new
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/rc.rs | 5 | ||||
| -rw-r--r-- | 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<T: ?Sized> Weak<T> { } } - /// 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<T: ?Sized> Weak<T> { } } - /// 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 /// /// ``` |
