From a846ed1654fb16ca8505f5290613bdc8bd17bb26 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 5 Oct 2018 14:25:53 +0200 Subject: [PATCH] Upgrade to rustc 1.31.0-nightly (8c4ad4e9e 2018-10-04) CC https://github.com/rust-lang/rust/issues/54846 --- components/script/dom/bindings/codegen/CodegenRust.py | 9 ++++++++- rust-toolchain | 2 +- 2 files changed, 9 insertions(+), 2 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); diff --git a/rust-toolchain b/rust-toolchain index 8cf661266f8..0d3073c971b 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2018-08-29 +nightly-2018-10-05