aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo_arc/lib.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-06-23 16:01:02 -0700
committerGitHub <noreply@github.com>2017-06-23 16:01:02 -0700
commitbb9391ba2cacc2976d546c42cb339fa3e7cbf35c (patch)
tree85e441b27acb8795cf40241647736cf3f99d0c51 /components/servo_arc/lib.rs
parente2a26e7bd0d8089a441bc3072cf15351b0ef1252 (diff)
parent096cee8ebc42d182376816a3947fa6dad6d0ba9a (diff)
downloadservo-bb9391ba2cacc2976d546c42cb339fa3e7cbf35c.tar.gz
servo-bb9391ba2cacc2976d546c42cb339fa3e7cbf35c.zip
Auto merge of #17493 - froydnj:rust-117-fixes, r=jdm
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(). - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because they are trivial replacements. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17493) <!-- Reviewable:end -->
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()) }