mirror of
https://github.com/servo/servo.git
synced 2025-07-29 18:20:24 +01:00
Auto merge of #10152 - jdm:9511-rebase, r=nox
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 Rebase of #9691. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10152) <!-- Reviewable:end -->
This commit is contained in:
commit
edcf24fd4d
1 changed files with 2 additions and 2 deletions
|
@ -5334,8 +5334,8 @@ class CGBindingRoot(CGThing):
|
||||||
# Do codegen for all the typdefs
|
# Do codegen for all the typdefs
|
||||||
for t in typedefs:
|
for t in typedefs:
|
||||||
if t.innerType.isUnion():
|
if t.innerType.isUnion():
|
||||||
cgthings.extend([CGGeneric("\npub type %s = %s;\n\n" % (t.identifier.name,
|
cgthings.extend([CGGeneric("\npub use dom::bindings::codegen::UnionTypes::%s as %s;\n\n" %
|
||||||
"UnionTypes::" + str(t.innerType)))])
|
(t.innerType, t.identifier.name))])
|
||||||
else:
|
else:
|
||||||
assert not typeNeedsRooting(t.innerType, config.getDescriptorProvider)
|
assert not typeNeedsRooting(t.innerType, config.getDescriptorProvider)
|
||||||
cgthings.extend([CGGeneric("\npub type %s = " % (t.identifier.name)),
|
cgthings.extend([CGGeneric("\npub type %s = " % (t.identifier.name)),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue