Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup

This commit is contained in:
flip1995
2021-06-03 08:41:37 +02:00
parent 91aa821745
commit 6c27482115
189 changed files with 2372 additions and 1310 deletions

View File

@@ -59,7 +59,7 @@ impl<'tcx> MutVarsDelegate {
//FIXME: This causes false negatives. We can't get the `NodeId` from
//`Categorization::Upvar(_)`. So we search for any `Upvar`s in the
//`while`-body, not just the ones in the condition.
self.skip = true
self.skip = true;
},
_ => {},
}
@@ -71,12 +71,12 @@ impl<'tcx> Delegate<'tcx> for MutVarsDelegate {
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, bk: ty::BorrowKind) {
if let ty::BorrowKind::MutBorrow = bk {
self.update(&cmt)
self.update(cmt);
}
}
fn mutate(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId) {
self.update(&cmt)
self.update(cmt);
}
fn fake_read(&mut self, _: rustc_typeck::expr_use_visitor::Place<'tcx>, _: FakeReadCause, _: HirId) {}