Skip to content

Commit

Permalink
Update to new internal rustc tables() API.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed Jun 30, 2020
1 parent 392dd1d commit 4b86df4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/script_plugins/lib.rs
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 4b86df4

Please sign in to comment.