]> git.lizzy.rs Git - rust.git/blobdiff - clippy_utils/src/usage.rs
Add instructions to run from source
[rust.git] / clippy_utils / src / usage.rs
index 650b70c63af9534de621d959c29cbcc5d4bd35e3..2c55021ac88374f0c8fe450e8d8d3bbd75127b6d 100644 (file)
@@ -59,7 +59,7 @@ fn update(&mut self, cat: &PlaceWithHirId<'tcx>) {
                 //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 @@ fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId, _: ConsumeMode) {}
 
     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) {}