]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/escape.rs
Auto merge of #3946 - rchaser53:issue-3920, r=flip1995
[rust.git] / clippy_lints / src / escape.rs
index 75b822b69880e136582d5310607130e235fe68d4..59ca2563cda6eb4a247aeb4789e9195f25b7aad5 100644 (file)
@@ -102,8 +102,8 @@ fn check_fn(
 impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
     fn consume(&mut self, _: HirId, _: Span, cmt: &cmt_<'tcx>, mode: ConsumeMode) {
         if let Categorization::Local(lid) = cmt.cat {
-            if let Move(DirectRefMove) = mode {
-                // Moved out or in. Clearly can't be localized.
+            if let Move(DirectRefMove) | Move(CaptureMove) = mode {
+                // moved out or in. clearly can't be localized
                 self.set.remove(&lid);
             }
         }