aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/hashglobe/src/shim.rs3
-rw-r--r--components/servo_arc/lib.rs1
-rw-r--r--components/style/rule_tree/mod.rs2
3 files changed, 5 insertions, 1 deletions
diff --git a/components/hashglobe/src/shim.rs b/components/hashglobe/src/shim.rs
index 08fbf32b72f..146ff851a0e 100644
--- a/components/hashglobe/src/shim.rs
+++ b/components/hashglobe/src/shim.rs
@@ -1,5 +1,6 @@
use std::marker::PhantomData;
+// FIXME: remove this and use std::ptr::NonNull when Firefox requires Rust 1.25+
pub struct NonZeroPtr<T: 'static>(&'static T);
impl<T: 'static> NonZeroPtr<T> {
@@ -57,4 +58,4 @@ impl<'a, T> From<&'a mut T> for Shared<T> {
fn from(reference: &'a mut T) -> Self {
unsafe { Shared::new_unchecked(reference) }
}
-} \ No newline at end of file
+}
diff --git a/components/servo_arc/lib.rs b/components/servo_arc/lib.rs
index d7694901130..1301a8e6611 100644
--- a/components/servo_arc/lib.rs
+++ b/components/servo_arc/lib.rs
@@ -83,6 +83,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
/// that this is all a temporary hack, this restriction is fine for now.
///
/// [1]: https://github.com/rust-lang/rust/issues/27730
+// FIXME: remove this and use std::ptr::NonNull when Firefox requires Rust 1.25+
pub struct NonZeroPtrMut<T: ?Sized + 'static>(&'static mut T);
impl<T: ?Sized> NonZeroPtrMut<T> {
pub fn new(ptr: *mut T) -> Self {
diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs
index e5b7e273885..2a137d7eb79 100644
--- a/components/style/rule_tree/mod.rs
+++ b/components/style/rule_tree/mod.rs
@@ -828,6 +828,8 @@ impl MallocSizeOf for RuleNode {
}
}
+// FIXME: use std::ptr::NonNull when Firefox requires Rust 1.25+
+
#[derive(Clone)]
struct WeakRuleNode {
p: NonZeroPtrMut<RuleNode>,