From 925718d8eb586d143de73e7eb3428cafb25077db Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Sun, 21 Jul 2024 00:24:35 +0700 Subject: [PATCH] Make the "expensive" comment belong to a branch --- clippy_lints/src/use_self.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/use_self.rs b/clippy_lints/src/use_self.rs index e0efc536e34b..994ca9b66906 100644 --- a/clippy_lints/src/use_self.rs +++ b/clippy_lints/src/use_self.rs @@ -94,8 +94,8 @@ impl<'tcx> LateLintPass<'tcx> for UseSelf { .as_ref() .is_none_or(|params| params.parenthesized == GenericArgsParentheses::No) && !item.span.from_expansion() + // expensive, should be last check && !is_from_proc_macro(cx, item) - // expensive, should be last check { // Self cannot be used inside const generic parameters let types_to_skip = generics