]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_borrowck/borrowck/check_loans.rs
Rollup merge of #45097 - nivkner:fixme_fixup2, r=estebank
[rust.git] / src / librustc_borrowck / borrowck / check_loans.rs
index 0fc1b68b87847e1bf7e82c73620d7a4203e11dab..0e9fb583407c837ee5762512b564193966cca187 100644 (file)
@@ -770,7 +770,8 @@ fn check_assignment(&self,
             let lp = opt_loan_path(&assignee_cmt).unwrap();
             self.move_data.each_assignment_of(assignment_id, &lp, |assign| {
                 if assignee_cmt.mutbl.is_mutable() {
-                    self.tcx().used_mut_nodes.borrow_mut().insert(local_id);
+                    let hir_id = self.bccx.tcx.hir.node_to_hir_id(local_id);
+                    self.bccx.used_mut_nodes.borrow_mut().insert(hir_id);
                 } else {
                     self.bccx.report_reassigned_immutable_variable(
                         assignment_span,