From f3c58773026bf042142be2bf8ed1e8b8797a4f68 Mon Sep 17 00:00:00 2001 From: Red Rapious Date: Wed, 23 Aug 2023 13:46:12 +0200 Subject: [PATCH] Put `is_from_proc_macro` last --- clippy_lints/src/reserve_after_initialization.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/reserve_after_initialization.rs b/clippy_lints/src/reserve_after_initialization.rs index 7ba10c97595..0c8c904e374 100644 --- a/clippy_lints/src/reserve_after_initialization.rs +++ b/clippy_lints/src/reserve_after_initialization.rs @@ -112,8 +112,8 @@ impl<'tcx> LateLintPass<'tcx> for ReserveAfterInitialization { if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt.kind && let ExprKind::MethodCall(name, self_arg, [space_hint], _) = expr.kind && path_to_local_id(self_arg, searcher.local_id) - && !is_from_proc_macro(cx, expr) && name.ident.as_str() == "reserve" + && !is_from_proc_macro(cx, expr) { self.searcher = Some(VecReserveSearcher { err_span: searcher.err_span.to(stmt.span),