Remove is_autoref parameter

This commit is contained in:
Eric Holk 2022-03-10 17:24:08 -08:00
parent 840dc10471
commit 05008fe127
5 changed files with 5 additions and 5 deletions

View file

@ -154,7 +154,7 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
} }
} }
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind, _is_autoref: bool) { fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind) {
if cmt.place.projections.is_empty() { if cmt.place.projections.is_empty() {
if let PlaceBase::Local(lid) = cmt.place.base { if let PlaceBase::Local(lid) = cmt.place.base {
self.set.remove(&lid); self.set.remove(&lid);

View file

@ -90,7 +90,7 @@ struct MutatePairDelegate<'a, 'tcx> {
impl<'tcx> Delegate<'tcx> for MutatePairDelegate<'_, 'tcx> { impl<'tcx> Delegate<'tcx> for MutatePairDelegate<'_, 'tcx> {
fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {} fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {}
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, diag_expr_id: HirId, bk: ty::BorrowKind, _is_autoref: bool) { fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, diag_expr_id: HirId, bk: ty::BorrowKind) {
if bk == ty::BorrowKind::MutBorrow { if bk == ty::BorrowKind::MutBorrow {
if let PlaceBase::Local(id) = cmt.place.base { if let PlaceBase::Local(id) = cmt.place.base {
if Some(id) == self.hir_id_low && !BreakAfterExprVisitor::is_found(self.cx, diag_expr_id) { if Some(id) == self.hir_id_low && !BreakAfterExprVisitor::is_found(self.cx, diag_expr_id) {

View file

@ -332,7 +332,7 @@ impl<'tcx> euv::Delegate<'tcx> for MovedVariablesCtxt {
self.move_common(cmt); self.move_common(cmt);
} }
fn borrow(&mut self, _: &euv::PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind, _is_autoref: bool) {} fn borrow(&mut self, _: &euv::PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind) {}
fn mutate(&mut self, _: &euv::PlaceWithHirId<'tcx>, _: HirId) {} fn mutate(&mut self, _: &euv::PlaceWithHirId<'tcx>, _: HirId) {}

View file

@ -886,7 +886,7 @@ impl<'tcx> Delegate<'tcx> for DerefDelegate<'_, 'tcx> {
fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {} fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {}
#[allow(clippy::too_many_lines)] #[allow(clippy::too_many_lines)]
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind, _is_autoref: bool) { fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind) {
if let PlaceBase::Local(id) = cmt.place.base { if let PlaceBase::Local(id) = cmt.place.base {
let map = self.cx.tcx.hir(); let map = self.cx.tcx.hir();
let span = map.span(cmt.hir_id); let span = map.span(cmt.hir_id);

View file

@ -64,7 +64,7 @@ impl<'tcx> MutVarsDelegate {
impl<'tcx> Delegate<'tcx> for MutVarsDelegate { impl<'tcx> Delegate<'tcx> for MutVarsDelegate {
fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {} fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {}
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, bk: ty::BorrowKind, _is_autoref: bool) { fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, bk: ty::BorrowKind) {
if bk == ty::BorrowKind::MutBorrow { if bk == ty::BorrowKind::MutBorrow {
self.update(cmt); self.update(cmt);
} }