mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
Fix #9511. Export webidl enums using "pub use".
Change typedef codegen to export the underlying enum itself, rather than an alias. Works around https://github.com/rust-lang/rust/issues/31355
This commit is contained in:
@@ -5349,8 +5349,8 @@ class CGBindingRoot(CGThing):
|
||||
# Do codegen for all the typdefs
|
||||
for t in typedefs:
|
||||
if t.innerType.isUnion():
|
||||
cgthings.extend([CGGeneric("\npub type %s = %s;\n\n" % (t.identifier.name,
|
||||
"UnionTypes::" + str(t.innerType)))])
|
||||
cgthings.extend([CGGeneric("\npub use dom::bindings::codegen::UnionTypes::%s as %s;\n\n" %
|
||||
(t.innerType, t.identifier.name))])
|
||||
else:
|
||||
assert not typeNeedsRooting(t.innerType, config.getDescriptorProvider)
|
||||
cgthings.extend([CGGeneric("\npub type %s = " % (t.identifier.name)),
|
||||
|
||||
Reference in New Issue
Block a user