mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Do not allow unused_parens in codegen anymore
This commit is contained in:
parent
1064e7decc
commit
2c8638ea9e
2 changed files with 5 additions and 6 deletions
|
@ -1631,7 +1631,6 @@ class CGImports(CGWrapper):
|
|||
'unreachable_code',
|
||||
'non_camel_case_types',
|
||||
'non_upper_case_globals',
|
||||
'unused_parens',
|
||||
'unused_imports',
|
||||
'unused_variables',
|
||||
'unused_assignments',
|
||||
|
@ -2955,7 +2954,7 @@ class CGStaticSetter(CGAbstractStaticBindingMethod):
|
|||
self.attr)
|
||||
checkForArg = CGGeneric(
|
||||
"let args = CallArgs::from_vp(vp, argc);\n"
|
||||
"if (argc == 0) {\n"
|
||||
"if argc == 0 {\n"
|
||||
" throw_type_error(cx, \"Not enough arguments to %s setter.\");\n"
|
||||
" return JSFalse;\n"
|
||||
"}" % self.attr.identifier.name)
|
||||
|
@ -4346,7 +4345,7 @@ if !expando.ptr.is_null() {
|
|||
|
||||
namedGetter = self.descriptor.operations['NamedGetter']
|
||||
if namedGetter:
|
||||
getNamed = ("if (RUST_JSID_IS_STRING(id) != 0) {\n" +
|
||||
getNamed = ("if RUST_JSID_IS_STRING(id) != 0 {\n" +
|
||||
CGIndenter(CGProxyNamedGetter(self.descriptor, templateValues)).define() +
|
||||
"}\n")
|
||||
else:
|
||||
|
@ -5514,7 +5513,7 @@ class CallbackMember(CGNativeMember):
|
|||
conversion = (
|
||||
CGIfWrapper(CGGeneric(conversion),
|
||||
"%s.is_some()" % arg.identifier.name).define() +
|
||||
" else if (argc == %d) {\n"
|
||||
" else if argc == %d {\n"
|
||||
" // This is our current trailing argument; reduce argc\n"
|
||||
" argc -= 1;\n"
|
||||
"} else {\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue