Use the typer in ExprUseVisitor and do not hard code to tcx
This commit is contained in:
parent
ead198c513
commit
230d0eb003
1 changed files with 1 additions and 1 deletions
|
|
@ -1254,7 +1254,7 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
|
|||
// inferred by regionbk
|
||||
let upvar_id = ty::UpvarId { var_id: id_var,
|
||||
closure_expr_id: closure_expr.id };
|
||||
let upvar_borrow = self.tcx().upvar_borrow_map.borrow()[upvar_id].clone();
|
||||
let upvar_borrow = self.typer.upvar_borrow(upvar_id);
|
||||
|
||||
self.delegate.borrow(closure_expr.id,
|
||||
closure_expr.span,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue