Use HirId from PlaceWithHirId rather than using the one provided to the function
This commit is contained in:
parent
7e46217362
commit
5875bd2b5f
1 changed files with 2 additions and 2 deletions
|
|
@ -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),
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue