Skip to content

Commit

Permalink
Change order of copy and borrow to avoid conflict
Browse files Browse the repository at this point in the history
Note that the first argument is `self as &mut dyn Delegate`, so this
isn't allowed with two-phase borrows.
  • Loading branch information
matthewjasper committed Jul 29, 2018
1 parent 503455b commit 18d5f82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librustc_passes/rvalue_promotion.rs
Expand Up @@ -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);
Expand Down

0 comments on commit 18d5f82

Please sign in to comment.