diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 39409e7deaa08..fd2df0799c6cd 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -2278,7 +2278,14 @@ def define(self): 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); diff --git a/rust-toolchain b/rust-toolchain index 8cf661266f829..0d3073c971ba9 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2018-08-29 +nightly-2018-10-05