From 12dc54d23849f6bc90667e2df432e30587e4af49 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Tue, 16 Sep 2014 01:28:36 +0530 Subject: Add unrooted_must_root lint for enums and structs containing JS, as well as functions with JS in their parameter list For safe wrappers over JS (eg Temporary) use #[allow(unrooted_must_root)]. For all other types containing a #[must_root] value, annotate the type with #[must_root] to ensure that it is never used unrooted --- components/script/dom/document.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'components/script/dom/document.rs') diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 8f8f8e5c607..97fb575fc01 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -69,6 +69,7 @@ pub enum IsHTMLDocument { } #[deriving(Encodable)] +#[must_root] pub struct Document { pub node: Node, reflector_: Reflector, -- cgit v1.2.3