From 392dd1d3d60a1281b092f8bc0010ad5cd360b64d Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 30 Jun 2020 16:51:09 -0400 Subject: [PATCH 1/2] Update to 6/30 rustc. --- rust-toolchain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain b/rust-toolchain index 38819f8f093..acc2c472b54 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2020-06-22 +nightly-2020-06-30 From 4b86df4378aa3216759e9659d0000e76d1c368fe Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 30 Jun 2020 16:52:14 -0400 Subject: [PATCH 2/2] Update to new internal rustc tables() API. --- components/script_plugins/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs index 8de2a85a47c..e01f1d38201 100644 --- a/components/script_plugins/lib.rs +++ b/components/script_plugins/lib.rs @@ -315,7 +315,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> { let cx = self.cx; let require_rooted = |cx: &LateContext, in_new_function: bool, subexpr: &hir::Expr| { - let ty = cx.tables.expr_ty(&subexpr); + let ty = cx.tables().expr_ty(&subexpr); if is_unrooted_ty(&self.symbols, cx, ty, in_new_function) { cx.lint(UNROOTED_MUST_ROOT, |lint| { lint.build(&format!("Expression of type {:?} must be rooted", ty)) @@ -357,7 +357,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> { match pat.kind { hir::PatKind::Binding(hir::BindingAnnotation::Unannotated, ..) | hir::PatKind::Binding(hir::BindingAnnotation::Mutable, ..) => { - let ty = cx.tables.pat_ty(pat); + let ty = cx.tables().pat_ty(pat); if is_unrooted_ty(&self.symbols, cx, ty, self.in_new_function) { cx.lint(UNROOTED_MUST_ROOT, |lint| { lint.build(&format!("Expression of type {:?} must be rooted", ty))