Skip to content

Commit 230d0eb

Browse files
committed
Use the typer in ExprUseVisitor and do not hard code to tcx
1 parent ead198c commit 230d0eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/expr_use_visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
12541254
// inferred by regionbk
12551255
let upvar_id = ty::UpvarId { var_id: id_var,
12561256
closure_expr_id: closure_expr.id };
1257-
let upvar_borrow = self.tcx().upvar_borrow_map.borrow()[upvar_id].clone();
1257+
let upvar_borrow = self.typer.upvar_borrow(upvar_id);
12581258

12591259
self.delegate.borrow(closure_expr.id,
12601260
closure_expr.span,

0 commit comments

Comments
 (0)