diff --git a/components/hashglobe/src/shim.rs b/components/hashglobe/src/shim.rs index 08fbf32b72fd..146ff851a0e5 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(&'static T); impl NonZeroPtr { @@ -57,4 +58,4 @@ impl<'a, T> From<&'a mut T> for Shared { 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 d76949011304..1301a8e66116 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(&'static mut T); impl NonZeroPtrMut { pub fn new(ptr: *mut T) -> Self { diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs index e5b7e2738859..2a137d7eb79d 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,