mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Prevent doing use self::FooBinding::{}
This commit is contained in:
parent
bd05aa2c3c
commit
b745866a4d
1 changed files with 7 additions and 3 deletions
|
@ -5768,9 +5768,13 @@ class CGDescriptor(CGThing):
|
|||
cgThings = CGWrapper(CGNamespace(toBindingNamespace(descriptor.name),
|
||||
cgThings, public=True),
|
||||
post='\n')
|
||||
reexports = ', '.join(map(lambda name: reexportedName(name), reexports))
|
||||
self.cgRoot = CGList([CGGeneric('pub use self::%s::{%s};' % (toBindingNamespace(descriptor.name), reexports)),
|
||||
cgThings], '\n')
|
||||
|
||||
if reexports:
|
||||
reexports = ', '.join(map(lambda name: reexportedName(name), reexports))
|
||||
cgThings = CGList([CGGeneric('pub use self::%s::{%s};' % (toBindingNamespace(descriptor.name), reexports)),
|
||||
cgThings], '\n')
|
||||
|
||||
self.cgRoot = cgThings
|
||||
|
||||
def define(self):
|
||||
return self.cgRoot.define()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue