diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-02-15 15:36:48 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-02-15 15:36:48 -0700 |
commit | 05db1a449908152495523b11b280acca338bb320 (patch) | |
tree | 03bfacb36f6708dd2833ce3654b2934a71146d93 /components/script/dom/bindings/codegen | |
parent | 5b2f2c55057493a6d6b1b56d02173625fbe403a8 (diff) | |
parent | 746c3ebd7d432af096447f70f0ae9630aa55091a (diff) | |
download | servo-05db1a449908152495523b11b280acca338bb320.tar.gz servo-05db1a449908152495523b11b280acca338bb320.zip |
auto merge of #4935 : Ms2ger/servo/UnionTypes, r=jdm
Diffstat (limited to 'components/script/dom/bindings/codegen')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 858b77f88b1..46731cf9824 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -3015,8 +3015,11 @@ class CGUnionConversionStruct(CGThing): pre="fn from_jsval(cx: *mut JSContext, value: JSVal, _option: ()) -> Result<%s, ()> {\n" % self.type, post="\n}") return CGWrapper( - CGIndenter(method), - pre="impl FromJSValConvertible for %s {\ntype Config = ();\n" % self.type, + CGIndenter(CGList([ + CGGeneric("type Config = ();"), + method, + ], "\n")), + pre="impl FromJSValConvertible for %s {\n" % self.type, post="\n}") def try_method(self, t): |