aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-10-19 10:35:08 -0500
committerGitHub <noreply@github.com>2017-10-19 10:35:08 -0500
commitfe16c1d5c3c9084da0ccb85af599d6ec0f8ab20b (patch)
tree84fe331eb4af20575050134b234b6c99a252726d /components/script/dom/bindings/codegen/CodegenRust.py
parent07e9794306d597afe5d90d192fd32a99572c3cc3 (diff)
parente8e2d0a4b24475b018dbc7e59ea46fdceaf20815 (diff)
downloadservo-fe16c1d5c3c9084da0ccb85af599d6ec0f8ab20b.tar.gz
servo-fe16c1d5c3c9084da0ccb85af599d6ec0f8ab20b.zip
Auto merge of #18809 - Eijebong:bitflags, r=nox
Update bitflags to 1.0 in every servo crate It still needs dependencies update to remove all the other bitflags versions. - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because it's a dependency update <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18809) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 3251290f398..859e98931a5 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -2039,7 +2039,7 @@ DOMClass {
interface_chain: [ %s ],
type_id: %s,
malloc_size_of: %s as unsafe fn(&mut _, _) -> _,
- global: InterfaceObjectMap::%s,
+ global: InterfaceObjectMap::Globals::%s,
}""" % (prototypeChainString, DOMClassTypeId(descriptor), mallocSizeOf, globals_)
@@ -2445,7 +2445,7 @@ class CGConstructorEnabled(CGAbstractMethod):
iface = self.descriptor.interface
bits = " | ".join(sorted(
- "InterfaceObjectMap::" + camel_to_upper_snake(i) for i in iface.exposureSet
+ "InterfaceObjectMap::Globals::" + camel_to_upper_snake(i) for i in iface.exposureSet
))
conditions.append("is_exposed_in(aObj, %s)" % bits)
@@ -7092,9 +7092,9 @@ class GlobalGenRoots():
for (idx, d) in enumerate(global_descriptors)
)
global_flags = CGWrapper(CGIndenter(CGList([
- CGGeneric("const %s = %#x," % args)
+ CGGeneric("const %s = %#x;" % args)
for args in flags
- ], "\n")), pre="pub flags Globals: u8 {\n", post="\n}")
+ ], "\n")), pre="pub struct Globals: u8 {\n", post="\n}")
globals_ = CGWrapper(CGIndenter(global_flags), pre="bitflags! {\n", post="\n}")
phf = CGGeneric("include!(concat!(env!(\"OUT_DIR\"), \"/InterfaceObjectMapPhf.rs\"));")