Change order of copy and borrow to avoid conflict

Note that the first argument is `self as &mut dyn Delegate`, so this
isn't allowed with two-phase borrows.
This commit is contained in:
Matthew Jasper 2018-07-29 18:02:13 +01:00
parent 503455bcc7
commit 18d5f82148
1 changed files with 2 additions and 1 deletions

View File

@ -248,7 +248,8 @@ impl<'a, 'tcx> CheckCrateVisitor<'a, 'tcx> {
let tcx = self.tcx;
let param_env = self.param_env;
let region_scope_tree = self.tcx.region_scope_tree(item_def_id);
euv::ExprUseVisitor::new(self, tcx, param_env, &region_scope_tree, self.tables, None)
let tables = self.tables;
euv::ExprUseVisitor::new(self, tcx, param_env, &region_scope_tree, tables, None)
.consume_body(body);
let body_promotable = self.check_expr(&body.value);