diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2020-06-03 15:15:53 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2020-06-03 15:27:51 -0400 |
| commit | 71393422495b8d3c7a6e4ded3e64adaec45dca6d (patch) | |
| tree | 570760bdbfd5143a9cdb6f2735c984dddaf9c4d4 /src/liballoc/sync.rs | |
| parent | 6f4888845674837fd4b55adb66d9322e1973d7db (diff) | |
| download | rust-71393422495b8d3c7a6e4ded3e64adaec45dca6d.tar.gz rust-71393422495b8d3c7a6e4ded3e64adaec45dca6d.zip | |
Bump to 1.46
Diffstat (limited to 'src/liballoc/sync.rs')
| -rw-r--r-- | src/liballoc/sync.rs | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs index 5de3cac9d53..cd4172d6a2d 100644 --- a/src/liballoc/sync.rs +++ b/src/liballoc/sync.rs @@ -1093,11 +1093,7 @@ impl<T: ?Sized> Clone for Arc<T> { // We abort because such a program is incredibly degenerate, and we // don't care to support it. if old_size > MAX_REFCOUNT { - // remove `unsafe` on bootstrap bump - #[cfg_attr(not(bootstrap), allow(unused_unsafe))] - unsafe { - abort(); - } + abort(); } Self::from_inner(self.ptr) @@ -1616,11 +1612,7 @@ impl<T: ?Sized> Weak<T> { // See comments in `Arc::clone` for why we do this (for `mem::forget`). if n > MAX_REFCOUNT { - // remove `unsafe` on bootstrap bump - #[cfg_attr(not(bootstrap), allow(unused_unsafe))] - unsafe { - abort(); - } + abort(); } // Relaxed is valid for the same reason it is on Arc's Clone impl @@ -1767,10 +1759,7 @@ impl<T: ?Sized> Clone for Weak<T> { // See comments in Arc::clone() for why we do this (for mem::forget). if old_size > MAX_REFCOUNT { - #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // remove `unsafe` on bootstrap bump - unsafe { - abort(); - } + abort(); } Weak { ptr: self.ptr } |
