mirror of
https://github.com/servo/servo.git
synced 2025-06-15 20:04:28 +00:00
Warning police
And fix some formatting.
This commit is contained in:
parent
3f1051022a
commit
5157eac238
3 changed files with 13 additions and 9 deletions
|
@ -2170,7 +2170,12 @@ class CGImports(CGWrapper):
|
|||
# TODO imports to cover descriptors, etc.
|
||||
|
||||
def _useString(imports):
|
||||
return '#[allow(non_uppercase_statics,unused_imports,unused_variable,unused_unsafe,unused_mut,dead_assignment)];\n' + ''.join(['use %s;\n' % i for i in imports]) + '\n'
|
||||
# Allow unreachable_code because we use 'break' in a way that sometimes produces
|
||||
# two 'break's in a row. See for example CallbackMember.getArgConversions.
|
||||
return '\n'.join([
|
||||
'#[allow(unreachable_code,non_uppercase_statics,unused_imports,unused_variable,unused_unsafe,unused_mut,dead_assignment)];',
|
||||
''.join('use %s;\n' % i for i in imports),
|
||||
''])
|
||||
CGWrapper.__init__(self, child,
|
||||
declarePre=_useString(sorted(declareImports)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue