From 1dcede75d72713f454f08ec93c22a06199eb861b Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 31 Aug 2017 17:17:59 +0200 Subject: [PATCH] Upgrade to rustc 1.21.0-nightly (7eeac1b81 2017-08-30) --- components/script/dom/bindings/trace.rs | 7 +++++++ components/script_plugins/utils.rs | 2 +- rust-toolchain | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index df681e3add9..b566e972ec2 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -425,6 +425,13 @@ unsafe impl JSTraceable for fn(A) -> B { } } +unsafe impl<'a, A, B> JSTraceable for fn(&A) -> B { + #[inline] + unsafe fn trace(&self, _: *mut JSTracer) { + // Do nothing + } +} + unsafe impl JSTraceable for IpcSender where T: for<'de> Deserialize<'de> + Serialize { #[inline] unsafe fn trace(&self, _: *mut JSTracer) { diff --git a/components/script_plugins/utils.rs b/components/script_plugins/utils.rs index 4f6fce2d0ed..45a348ea14f 100644 --- a/components/script_plugins/utils.rs +++ b/components/script_plugins/utils.rs @@ -29,7 +29,7 @@ pub fn match_def_path(cx: &LateContext, def_id: DefId, path: &[&str]) -> bool { } pub fn in_derive_expn(span: Span) -> bool { - if let Some(i) = span.ctxt.outer().expn_info() { + if let Some(i) = span.ctxt().outer().expn_info() { if let ExpnFormat::MacroAttribute(n) = i.callee.format { n.as_str().contains("derive") } else { diff --git a/rust-toolchain b/rust-toolchain index 202c6314dd9..009c84eceb4 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2017-08-30 +nightly-2017-08-31