diff --git a/components/macros/lib.rs b/components/macros/lib.rs index 5b9aa64a52d..c2af641f165 100644 --- a/components/macros/lib.rs +++ b/components/macros/lib.rs @@ -62,6 +62,12 @@ impl LintPass for TransmutePass { } fn lint_unrooted_ty(cx: &Context, ty: &ast::Ty, warning: &str) { + let ty = match ty.node { + ast::TyBox(ref t) | ast::TyUniq(ref t) | + ast::TyVec(ref t) | ast::TyFixedLengthVec(ref t, _) | + ast::TyPtr(ast::MutTy { ty: ref t, ..}) | ast::TyRptr(_, ast::MutTy { ty: ref t, ..}) => &**t, + _ => ty + }; match ty.node { ast::TyPath(_, _, id) => { match cx.tcx.def_map.borrow().get_copy(&id) { diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs index c77ae3cba17..7754adce672 100644 --- a/components/script/dom/bindings/js.rs +++ b/components/script/dom/bindings/js.rs @@ -113,6 +113,7 @@ pub struct JS { } impl PartialEq for JS { + #[allow(unrooted_must_root)] fn eq(&self, other: &JS) -> bool { self.ptr == other.ptr } @@ -373,6 +374,7 @@ impl RootCollection { } /// Create a new stack-bounded root that will not outlive this collection + #[allow(unrooted_must_root)] fn new_root<'a, 'b, T: Reflectable>(&'a self, unrooted: &JS) -> Root<'a, 'b, T> { Root::new(self, unrooted) } diff --git a/components/script/dom/htmlserializer.rs b/components/script/dom/htmlserializer.rs index 624ede52bb7..3737b498bb1 100644 --- a/components/script/dom/htmlserializer.rs +++ b/components/script/dom/htmlserializer.rs @@ -21,6 +21,7 @@ use dom::text::Text; use servo_util::atom::Atom; use servo_util::namespace; +#[allow(unrooted_must_root)] pub fn serialize(iterator: &mut NodeIterator) -> String { let mut html = String::new(); let mut open_elements: Vec = vec!();