diff options
| author | Aman Arora <me@aman-arora.com> | 2021-07-14 02:21:08 -0400 |
|---|---|---|
| committer | Aman Arora <me@aman-arora.com> | 2021-07-14 02:21:08 -0400 |
| commit | a9e9b7f9b2ad52035fe7b57bb0fc8ba62d649c33 (patch) | |
| tree | 95a091d4a9758e7ecd2ae5b6248d4325aa1af0be /clippy_utils | |
| parent | 075a28996c5bef3cd5fcc46717fd426034b03806 (diff) | |
| download | rust-a9e9b7f9b2ad52035fe7b57bb0fc8ba62d649c33.tar.gz rust-a9e9b7f9b2ad52035fe7b57bb0fc8ba62d649c33.zip | |
ExprUseVisitor::Delegate consume only when moving
Diffstat (limited to 'clippy_utils')
| -rw-r--r-- | clippy_utils/src/usage.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_utils/src/usage.rs b/clippy_utils/src/usage.rs index 2c55021ac88..82e4b300068 100644 --- a/clippy_utils/src/usage.rs +++ b/clippy_utils/src/usage.rs @@ -10,7 +10,7 @@ use rustc_lint::LateContext; use rustc_middle::hir::map::Map; use rustc_middle::mir::FakeReadCause; use rustc_middle::ty; -use rustc_typeck::expr_use_visitor::{ConsumeMode, Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId}; +use rustc_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId}; /// Returns a set of mutated local variable IDs, or `None` if mutations could not be determined. pub fn mutated_variables<'tcx>(expr: &'tcx Expr<'_>, cx: &LateContext<'tcx>) -> Option<HirIdSet> { @@ -67,7 +67,7 @@ impl<'tcx> MutVarsDelegate { } impl<'tcx> Delegate<'tcx> for MutVarsDelegate { - fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId, _: ConsumeMode) {} + fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {} fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, bk: ty::BorrowKind) { if let ty::BorrowKind::MutBorrow = bk { |
