Fix/silence some warnings

This commit is contained in:
Simon Sapin 2016-12-20 06:34:01 +01:00
parent 01442ba1ae
commit 53f5023685
3 changed files with 6 additions and 3 deletions

View file

@ -4260,7 +4260,9 @@ class CGUnionConversionStruct(CGThing):
return CGWrapper(
CGIndenter(jsConversion, 4),
pre="unsafe fn TryConvertTo%s(cx: *mut JSContext, value: HandleValue) -> %s {\n" % (t.name, returnType),
# TryConvertToObject is unused, but not generating it while generating others is tricky.
pre="#[allow(dead_code)] unsafe fn TryConvertTo%s(cx: *mut JSContext, value: HandleValue) -> %s {\n"
% (t.name, returnType),
post="\n}")
def define(self):