aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-10-05 14:25:53 +0200
committerSimon Sapin <simon.sapin@exyr.org>2018-10-05 15:06:29 +0200
commita846ed1654fb16ca8505f5290613bdc8bd17bb26 (patch)
tree7ad05a1f3fe230673539274299113509b602a825 /components/script/dom/bindings/codegen
parentcaa4d190af8bcd26df719e452b621952ae4dad0c (diff)
downloadservo-a846ed1654fb16ca8505f5290613bdc8bd17bb26.tar.gz
servo-a846ed1654fb16ca8505f5290613bdc8bd17bb26.zip
Upgrade to rustc 1.31.0-nightly (8c4ad4e9e 2018-10-04)
CC https://github.com/rust-lang/rust/issues/54846
Diffstat (limited to 'components/script/dom/bindings/codegen')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 39409e7deaa..fd2df0799c6 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -2278,7 +2278,14 @@ static NAMESPACE_OBJECT_CLASS: NamespaceObjectClass = unsafe {
return """\
static INTERFACE_OBJECT_CLASS: NonCallbackInterfaceObjectClass =
NonCallbackInterfaceObjectClass::new(
- &%(constructorBehavior)s,
+ {
+ // Intermediate `const` because as of nightly-2018-10-05,
+ // rustc is conservative in promotion to `'static` of the return values of `const fn`s:
+ // https://github.com/rust-lang/rust/issues/54846
+ // https://github.com/rust-lang/rust/pull/53851
+ const BEHAVIOR: InterfaceConstructorBehavior = %(constructorBehavior)s;
+ &BEHAVIOR
+ },
%(representation)s,
PrototypeList::ID::%(id)s,
%(depth)s);