about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2020-06-03 15:15:53 -0400
committerMark Rousskov <mark.simulacrum@gmail.com>2020-06-03 15:27:51 -0400
commit71393422495b8d3c7a6e4ded3e64adaec45dca6d (patch)
tree570760bdbfd5143a9cdb6f2735c984dddaf9c4d4 /src/liballoc
parent6f4888845674837fd4b55adb66d9322e1973d7db (diff)
downloadrust-71393422495b8d3c7a6e4ded3e64adaec45dca6d.tar.gz
rust-71393422495b8d3c7a6e4ded3e64adaec45dca6d.zip
Bump to 1.46
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/rc.rs12
-rw-r--r--src/liballoc/sync.rs17
2 files changed, 5 insertions, 24 deletions
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 4edbc2ff3ac..925bc7d3c02 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -2035,11 +2035,7 @@ trait RcBoxPtr<T: ?Sized> {
         // nevertheless, we insert an abort here to hint LLVM at
         // an otherwise missed optimization.
         if strong == 0 || strong == usize::max_value() {
-            // remove `unsafe` on bootstrap bump
-            #[cfg_attr(not(bootstrap), allow(unused_unsafe))]
-            unsafe {
-                abort();
-            }
+            abort();
         }
         self.inner().strong.set(strong + 1);
     }
@@ -2063,11 +2059,7 @@ trait RcBoxPtr<T: ?Sized> {
         // nevertheless, we insert an abort here to hint LLVM at
         // an otherwise missed optimization.
         if weak == 0 || weak == usize::max_value() {
-            // remove `unsafe` on bootstrap bump
-            #[cfg_attr(not(bootstrap), allow(unused_unsafe))]
-            unsafe {
-                abort();
-            }
+            abort();
         }
         self.inner().weak.set(weak + 1);
     }
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 }