Skip to content

Commit

Permalink
Use HirId from PlaceWithHirId rather than using the one provided …
Browse files Browse the repository at this point in the history
…to the function
  • Loading branch information
GuillaumeGomez committed Aug 17, 2023
1 parent 7e46217 commit 5875bd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/needless_pass_by_ref_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ impl<'tcx> euv::Delegate<'tcx> for MutablyUsedVariablesCtxt<'tcx> {
}
}

fn borrow(&mut self, cmt: &euv::PlaceWithHirId<'tcx>, id: HirId, borrow: ty::BorrowKind) {
fn borrow(&mut self, cmt: &euv::PlaceWithHirId<'tcx>, _id: HirId, borrow: ty::BorrowKind) {
self.prev_bind = None;
if let euv::Place {
base: euv::PlaceBase::Local(vid),
Expand Down Expand Up @@ -338,7 +338,7 @@ impl<'tcx> euv::Delegate<'tcx> for MutablyUsedVariablesCtxt<'tcx> {
],
),
..
}) = self.tcx.hir().get(id)
}) = self.tcx.hir().get(cmt.hir_id)
{
self.async_closures.insert(*def_id);
}
Expand Down

0 comments on commit 5875bd2

Please sign in to comment.