mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
Remove is_autoref parameter
This commit is contained in:
parent
840dc10471
commit
05008fe127
5 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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) {}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue