From 31e2f22d201ac6b049b99b978fcaeba2d3f29abc Mon Sep 17 00:00:00 2001 From: Tetsuharu OHZEKI Date: Wed, 8 Jan 2014 23:14:52 +0900 Subject: [PATCH] Add the comment to explain the dual declaration. --- src/components/script/dom/element.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/script/dom/element.rs b/src/components/script/dom/element.rs index aae0a7c3563..b1b3615f52e 100644 --- a/src/components/script/dom/element.rs +++ b/src/components/script/dom/element.rs @@ -219,6 +219,8 @@ impl Element { self.style_attribute = Some(style::parse_style_attribute(value)) } "id" => { + // XXX: this dual declaration are workaround to avoid the compile error: + // "borrowed value does not live long enough" let doc = self.node.owner_doc(); let doc = doc.mut_document(); doc.update_idmap(abstract_self, Some(value.clone()), old_value);