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:
parent
503455bcc7
commit
18d5f82148
|
@ -248,7 +248,8 @@ impl<'a, 'tcx> CheckCrateVisitor<'a, 'tcx> {
|
||||||
let tcx = self.tcx;
|
let tcx = self.tcx;
|
||||||
let param_env = self.param_env;
|
let param_env = self.param_env;
|
||||||
let region_scope_tree = self.tcx.region_scope_tree(item_def_id);
|
let region_scope_tree = self.tcx.region_scope_tree(item_def_id);
|
||||||
euv::ExprUseVisitor::new(self, tcx, param_env, ®ion_scope_tree, self.tables, None)
|
let tables = self.tables;
|
||||||
|
euv::ExprUseVisitor::new(self, tcx, param_env, ®ion_scope_tree, tables, None)
|
||||||
.consume_body(body);
|
.consume_body(body);
|
||||||
|
|
||||||
let body_promotable = self.check_expr(&body.value);
|
let body_promotable = self.check_expr(&body.value);
|
||||||
|
|
Loading…
Reference in New Issue