aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-10-05 09:16:34 -0400
committerGitHub <noreply@github.com>2018-10-05 09:16:34 -0400
commitba82eaa10e1870ec09ebcdb803e113dcaa75b7b4 (patch)
tree7ad05a1f3fe230673539274299113509b602a825 /components
parentcaa4d190af8bcd26df719e452b621952ae4dad0c (diff)
parenta846ed1654fb16ca8505f5290613bdc8bd17bb26 (diff)
downloadservo-ba82eaa10e1870ec09ebcdb803e113dcaa75b7b4.tar.gz
servo-ba82eaa10e1870ec09ebcdb803e113dcaa75b7b4.zip
Auto merge of #21872 - servo:rustup, r=nox
Upgrade to rustc 1.31.0-nightly (8c4ad4e9e 2018-10-04) CC https://github.com/rust-lang/rust/issues/54846 <!-- 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/21872) <!-- Reviewable:end -->
Diffstat (limited to 'components')
-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);