diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2019-08-16 17:45:44 +0200 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2019-08-16 17:45:44 +0200 |
| commit | 7a641f7c516ac666c72bf9edfbec8648aa0160c7 (patch) | |
| tree | a72fe192c18dc8e5a89d7169311d29e4b9698199 /src/liballoc/sync.rs | |
| parent | 810dfd7cd451c370d0c47d6aa9e62b16292a29e0 (diff) | |
| download | rust-7a641f7c516ac666c72bf9edfbec8648aa0160c7.tar.gz rust-7a641f7c516ac666c72bf9edfbec8648aa0160c7.zip | |
Relax the safety condition for get_mut_unchecked
Diffstat (limited to 'src/liballoc/sync.rs')
| -rw-r--r-- | src/liballoc/sync.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs index bb4d1499014..078ddc27da9 100644 --- a/src/liballoc/sync.rs +++ b/src/liballoc/sync.rs @@ -1104,8 +1104,10 @@ impl<T: ?Sized> Arc<T> { /// /// # Safety /// - /// There must be no other `Arc` or [`Weak`] pointers to the same value. - /// This is the case for example immediately after `Rc::new`. + /// Any other `Arc` or [`Weak`] pointers to the same value must not be dereferenced + /// for the duration of the returned borrow. + /// This is trivially the case if no such pointer exist, + /// for example immediately after `Arc::new`. /// /// # Examples /// |
