Skip to content

Commit 18d5f82

Browse files
committed
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.
1 parent 503455b commit 18d5f82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_passes/rvalue_promotion.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ impl<'a, 'tcx> CheckCrateVisitor<'a, 'tcx> {
248248
let tcx = self.tcx;
249249
let param_env = self.param_env;
250250
let region_scope_tree = self.tcx.region_scope_tree(item_def_id);
251-
euv::ExprUseVisitor::new(self, tcx, param_env, &region_scope_tree, self.tables, None)
251+
let tables = self.tables;
252+
euv::ExprUseVisitor::new(self, tcx, param_env, &region_scope_tree, tables, None)
252253
.consume_body(body);
253254

254255
let body_promotable = self.check_expr(&body.value);

0 commit comments

Comments
 (0)