diff --git a/clippy_lints/src/item_name_repetitions.rs b/clippy_lints/src/item_name_repetitions.rs index 693e022dffba..1107946f538b 100644 --- a/clippy_lints/src/item_name_repetitions.rs +++ b/clippy_lints/src/item_name_repetitions.rs @@ -212,7 +212,7 @@ impl ItemNameRepetitions { check_enum_end(cx, item_name, var); } - self.check_enum_common_affix(cx, item, def); + Self::check_enum_common_affix(cx, item, def); } /// Lint the names of struct fields against the name of the struct. @@ -225,7 +225,7 @@ impl ItemNameRepetitions { self.check_struct_common_affix(cx, item, fields); } - fn check_enum_common_affix(&self, cx: &LateContext<'_>, item: &Item<'_>, def: &EnumDef<'_>) { + fn check_enum_common_affix(cx: &LateContext<'_>, item: &Item<'_>, def: &EnumDef<'_>) { let first = match def.variants.first() { Some(variant) => variant.ident.name.as_str(), None => return,