aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2017-02-14 14:42:35 +0100
committerMs2ger <Ms2ger@gmail.com>2017-02-16 11:03:22 +0100
commit3613e8f231a06142abb726a28bcd8847e768708c (patch)
treed5f627d7faf8490ad624709e5572cd3bd8607f89 /components/script/dom/bindings/codegen/CodegenRust.py
parent8ce9ca624367c8e5737b8673548b230b69f4558b (diff)
downloadservo-3613e8f231a06142abb726a28bcd8847e768708c.tar.gz
servo-3613e8f231a06142abb726a28bcd8847e768708c.zip
Implement JSTraceable for more types.
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index c47cf185bf2..444d52d3ae6 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -4103,6 +4103,7 @@ class CGUnionStruct(CGThing):
% (self.type, v["name"]) for v in templateVars
]
return ("""\
+#[derive(JSTraceable)]
pub enum %s {
%s
}
@@ -5881,6 +5882,7 @@ class CGDictionary(CGThing):
for m in self.memberInfo]
return (string.Template(
+ "#[derive(JSTraceable)]\n"
"pub struct ${selfName} {\n" +
"${inheritance}" +
"\n".join(memberDecls) + "\n" +