mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +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',
|
'unreachable_code',
|
||||||
'non_camel_case_types',
|
'non_camel_case_types',
|
||||||
'non_upper_case_globals',
|
'non_upper_case_globals',
|
||||||
'unused_parens',
|
|
||||||
'unused_imports',
|
'unused_imports',
|
||||||
'unused_variables',
|
'unused_variables',
|
||||||
'unused_assignments',
|
'unused_assignments',
|
||||||
|
@ -2955,7 +2954,7 @@ class CGStaticSetter(CGAbstractStaticBindingMethod):
|
||||||
self.attr)
|
self.attr)
|
||||||
checkForArg = CGGeneric(
|
checkForArg = CGGeneric(
|
||||||
"let args = CallArgs::from_vp(vp, argc);\n"
|
"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"
|
" throw_type_error(cx, \"Not enough arguments to %s setter.\");\n"
|
||||||
" return JSFalse;\n"
|
" return JSFalse;\n"
|
||||||
"}" % self.attr.identifier.name)
|
"}" % self.attr.identifier.name)
|
||||||
|
@ -4346,7 +4345,7 @@ if !expando.ptr.is_null() {
|
||||||
|
|
||||||
namedGetter = self.descriptor.operations['NamedGetter']
|
namedGetter = self.descriptor.operations['NamedGetter']
|
||||||
if 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() +
|
CGIndenter(CGProxyNamedGetter(self.descriptor, templateValues)).define() +
|
||||||
"}\n")
|
"}\n")
|
||||||
else:
|
else:
|
||||||
|
@ -5514,7 +5513,7 @@ class CallbackMember(CGNativeMember):
|
||||||
conversion = (
|
conversion = (
|
||||||
CGIfWrapper(CGGeneric(conversion),
|
CGIfWrapper(CGGeneric(conversion),
|
||||||
"%s.is_some()" % arg.identifier.name).define() +
|
"%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"
|
" // This is our current trailing argument; reduce argc\n"
|
||||||
" argc -= 1;\n"
|
" argc -= 1;\n"
|
||||||
"} else {\n"
|
"} else {\n"
|
||||||
|
|
|
@ -168,13 +168,13 @@ pub mod codegen {
|
||||||
pub mod PrototypeList {
|
pub mod PrototypeList {
|
||||||
include!(concat!(env!("OUT_DIR"), "/PrototypeList.rs"));
|
include!(concat!(env!("OUT_DIR"), "/PrototypeList.rs"));
|
||||||
}
|
}
|
||||||
#[allow(unreachable_code, non_camel_case_types, non_upper_case_globals, unused_parens,
|
#[allow(unreachable_code, non_camel_case_types, non_upper_case_globals,
|
||||||
unused_imports, unused_variables, unused_assignments,
|
unused_imports, unused_variables, unused_assignments,
|
||||||
dead_code)]
|
dead_code)]
|
||||||
pub mod RegisterBindings {
|
pub mod RegisterBindings {
|
||||||
include!(concat!(env!("OUT_DIR"), "/RegisterBindings.rs"));
|
include!(concat!(env!("OUT_DIR"), "/RegisterBindings.rs"));
|
||||||
}
|
}
|
||||||
#[allow(unreachable_code, non_camel_case_types, non_upper_case_globals, unused_parens,
|
#[allow(unreachable_code, non_camel_case_types, non_upper_case_globals,
|
||||||
unused_imports, unused_variables, unused_assignments,
|
unused_imports, unused_variables, unused_assignments,
|
||||||
dead_code)]
|
dead_code)]
|
||||||
pub mod UnionTypes {
|
pub mod UnionTypes {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue