Skip to content

Commit e64ed3a

Browse files
Merge pull request #345 from nnethercote/master
Fix `script-servo` build errors.
2 parents 00ff17d + 443e444 commit e64ed3a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

collector/benchmarks/script-servo/components/script/dom/bindings/codegen/CodegenRust.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2158,7 +2158,14 @@ def define(self):
21582158
return """\
21592159
static INTERFACE_OBJECT_CLASS: NonCallbackInterfaceObjectClass =
21602160
NonCallbackInterfaceObjectClass::new(
2161-
&%(constructorBehavior)s,
2161+
{
2162+
// Intermediate `const` because as of nightly-2018-10-05,
2163+
// rustc is conservative in promotion to `'static` of the return values of `const fn`s:
2164+
// https://github.com/rust-lang/rust/issues/54846
2165+
// https://github.com/rust-lang/rust/pull/53851
2166+
const BEHAVIOR: InterfaceConstructorBehavior = %(constructorBehavior)s;
2167+
&BEHAVIOR
2168+
},
21622169
%(representation)s,
21632170
PrototypeList::ID::%(id)s,
21642171
%(depth)s);

collector/benchmarks/script-servo/components/script/dom/bindings/trace.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -432,13 +432,6 @@ unsafe impl<A, B> JSTraceable for fn(A) -> B {
432432
}
433433
}
434434

435-
unsafe impl<'a, A, B> JSTraceable for fn(&A) -> B {
436-
#[inline]
437-
unsafe fn trace(&self, _: *mut JSTracer) {
438-
// Do nothing
439-
}
440-
}
441-
442435
unsafe impl<T> JSTraceable for IpcSender<T> where T: for<'de> Deserialize<'de> + Serialize {
443436
#[inline]
444437
unsafe fn trace(&self, _: *mut JSTracer) {

0 commit comments

Comments
 (0)