From cf4e9813b0fee5a8a0d7e93eadd4d51d0492a9d6 Mon Sep 17 00:00:00 2001 From: Eric Wu Date: Mon, 2 Jan 2023 18:35:21 -0500 Subject: [PATCH] use OnlyBodies instead of All we only need to check closures, so nestedfilter::All was overkill here. --- clippy_utils/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs index b2175c5cb16..46769cf2392 100644 --- a/clippy_utils/src/lib.rs +++ b/clippy_utils/src/lib.rs @@ -1262,7 +1262,7 @@ pub struct ContainsName<'a, 'tcx> { } impl<'a, 'tcx> Visitor<'tcx> for ContainsName<'a, 'tcx> { - type NestedFilter = nested_filter::All; + type NestedFilter = nested_filter::OnlyBodies; fn visit_name(&mut self, name: Symbol) { if self.name == name {