mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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 -->
This commit is contained in:
commit
bb9391ba2c
6 changed files with 7 additions and 26 deletions
|
@ -186,14 +186,6 @@ macro_rules! reexport_computed_values {
|
|||
}
|
||||
longhand_properties_idents!(reexport_computed_values);
|
||||
|
||||
/// Pointer equality
|
||||
///
|
||||
/// FIXME: Remove this and use std::ptr::eq once we require Rust 1.17
|
||||
#[inline]
|
||||
pub fn ptr_eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
|
||||
a == b
|
||||
}
|
||||
|
||||
/// Serializes as CSS a comma-separated list of any `T` that supports being
|
||||
/// serialized as CSS.
|
||||
pub fn serialize_comma_separated_list<W, T>(dest: &mut W,
|
||||
|
|
|
@ -10,6 +10,8 @@ use atomic_refcell::{AtomicRefCell, AtomicRef, AtomicRefMut};
|
|||
use parking_lot::RwLock;
|
||||
use std::cell::UnsafeCell;
|
||||
use std::fmt;
|
||||
#[cfg(feature = "gecko")]
|
||||
use std::ptr;
|
||||
use stylearc::Arc;
|
||||
|
||||
/// A shared read/write lock that can protect multiple objects.
|
||||
|
@ -154,7 +156,7 @@ impl<T> Locked<T> {
|
|||
|
||||
#[cfg(feature = "gecko")]
|
||||
fn same_lock_as(&self, derefed_guard: &SomethingZeroSizedButTyped) -> bool {
|
||||
::ptr_eq(self.shared_lock.cell.as_ptr(), derefed_guard)
|
||||
ptr::eq(self.shared_lock.cell.as_ptr(), derefed_guard)
|
||||
}
|
||||
|
||||
/// Access the data for reading.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue