Skip to content

Commit 9f0f46f

Browse files
committed
Update clippy to new ExprUseVisitor delegate
1 parent 87ad668 commit 9f0f46f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/tools/clippy/clippy_lints/src/escape.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
154154
}
155155
}
156156

157-
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind) {
157+
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind, _is_autoref: bool) {
158158
if cmt.place.projections.is_empty() {
159159
if let PlaceBase::Local(lid) = cmt.place.base {
160160
self.set.remove(&lid);

src/tools/clippy/clippy_lints/src/loops/mut_range_bound.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct MutatePairDelegate<'a, 'tcx> {
9090
impl<'tcx> Delegate<'tcx> for MutatePairDelegate<'_, 'tcx> {
9191
fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {}
9292

93-
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, diag_expr_id: HirId, bk: ty::BorrowKind) {
93+
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, diag_expr_id: HirId, bk: ty::BorrowKind, _is_autoref: bool) {
9494
if bk == ty::BorrowKind::MutBorrow {
9595
if let PlaceBase::Local(id) = cmt.place.base {
9696
if Some(id) == self.hir_id_low && !BreakAfterExprVisitor::is_found(self.cx, diag_expr_id) {

src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ impl<'tcx> euv::Delegate<'tcx> for MovedVariablesCtxt {
332332
self.move_common(cmt);
333333
}
334334

335-
fn borrow(&mut self, _: &euv::PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind) {}
335+
fn borrow(&mut self, _: &euv::PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind, _is_autoref: bool) {}
336336

337337
fn mutate(&mut self, _: &euv::PlaceWithHirId<'tcx>, _: HirId) {}
338338

src/tools/clippy/clippy_utils/src/sugg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ impl<'tcx> Delegate<'tcx> for DerefDelegate<'_, 'tcx> {
886886
fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {}
887887

888888
#[allow(clippy::too_many_lines)]
889-
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind) {
889+
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind, _is_autoref: bool) {
890890
if let PlaceBase::Local(id) = cmt.place.base {
891891
let map = self.cx.tcx.hir();
892892
let span = map.span(cmt.hir_id);

src/tools/clippy/clippy_utils/src/usage.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl<'tcx> MutVarsDelegate {
6464
impl<'tcx> Delegate<'tcx> for MutVarsDelegate {
6565
fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {}
6666

67-
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, bk: ty::BorrowKind) {
67+
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, bk: ty::BorrowKind, _is_autoref: bool) {
6868
if bk == ty::BorrowKind::MutBorrow {
6969
self.update(cmt);
7070
}

0 commit comments

Comments
 (0)