auto merge of #4935 : Ms2ger/servo/UnionTypes, r=jdm

This commit is contained in:
bors-servo 2015-02-15 15:36:48 -07:00
commit 05db1a4499

View file

@ -3015,8 +3015,11 @@ class CGUnionConversionStruct(CGThing):
pre="fn from_jsval(cx: *mut JSContext, value: JSVal, _option: ()) -> Result<%s, ()> {\n" % self.type, pre="fn from_jsval(cx: *mut JSContext, value: JSVal, _option: ()) -> Result<%s, ()> {\n" % self.type,
post="\n}") post="\n}")
return CGWrapper( return CGWrapper(
CGIndenter(method), CGIndenter(CGList([
pre="impl FromJSValConvertible for %s {\ntype Config = ();\n" % self.type, CGGeneric("type Config = ();"),
method,
], "\n")),
pre="impl FromJSValConvertible for %s {\n" % self.type,
post="\n}") post="\n}")
def try_method(self, t): def try_method(self, t):