about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2021-09-19 13:46:05 -0400
committerMark Rousskov <mark.simulacrum@gmail.com>2021-09-20 22:21:43 -0400
commit1183371af17fb67317a9d860d3028db500a14ba7 (patch)
treef7ef5044d3b8affa637d11227aee0a6687eb5b12
parentede86797bd8249db720fc61a0c6b9d94c0bd9052 (diff)
downloadrust-1183371af17fb67317a9d860d3028db500a14ba7.tar.gz
rust-1183371af17fb67317a9d860d3028db500a14ba7.zip
Remove Drop-caused migration-added captures
All of these were added due to insignificant Drop types being present.
-rw-r--r--clippy_utils/src/lib.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs
index 5c505f6851a..3a94f472983 100644
--- a/clippy_utils/src/lib.rs
+++ b/clippy_utils/src/lib.rs
@@ -990,10 +990,7 @@ pub fn can_move_expr_to_closure(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) ->
         captures: HirIdMap::default(),
     };
     v.visit_expr(expr);
-    v.allow_closure.then(|| {
-        let _ = &v;
-        v.captures
-    })
+    v.allow_closure.then(|| v.captures)
 }
 
 /// Returns the method names and argument list of nested method call expressions that make up