aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo_arc/lib.rs
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@gmail.com>2017-06-23 09:50:56 -0400
committerNathan Froyd <froydnj@gmail.com>2017-06-23 10:39:41 -0400
commit096cee8ebc42d182376816a3947fa6dad6d0ba9a (patch)
tree59b87dfad6106a16e131dfcc1e92b229a2c6ee46 /components/servo_arc/lib.rs
parent567f5e8985c6e4ba86fca85ff8ff46779fe10a4e (diff)
downloadservo-096cee8ebc42d182376816a3947fa6dad6d0ba9a.tar.gz
servo-096cee8ebc42d182376816a3947fa6dad6d0ba9a.zip
remove various things now that Rust 1.17 is required
std::ptr::eq and Arc::ptr_eq are now usuable, and we can replace a panic!() with abort().
Diffstat (limited to 'components/servo_arc/lib.rs')
-rw-r--r--components/servo_arc/lib.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/components/servo_arc/lib.rs b/components/servo_arc/lib.rs
index cf4578d0eb0..0040fdea6d1 100644
--- a/components/servo_arc/lib.rs
+++ b/components/servo_arc/lib.rs
@@ -39,6 +39,7 @@ use std::hash::{Hash, Hasher};
use std::iter::{ExactSizeIterator, Iterator};
use std::mem;
use std::ops::{Deref, DerefMut};
+use std::process;
use std::ptr;
use std::slice;
use std::sync::atomic;
@@ -247,13 +248,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 {
- // Note: std::process::abort is stable in 1.17, which we don't yet
- // require for Gecko. Panic is good enough in practice here (it will
- // trigger an abort at least in Gecko, and this case is degenerate
- // enough that Servo shouldn't have code that triggers it).
- //
- // We should fix this when we require 1.17.
- panic!();
+ process::abort();
}
Arc { p: NonZeroPtrMut::new(self.ptr()) }