diff options
| author | Philipp Krones <hello@philkrones.com> | 2025-04-22 16:10:59 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2025-04-22 18:24:43 +0200 |
| commit | ff428d91c2b690b8dbd8cc1e48274870c24fe1e2 (patch) | |
| tree | 496897def77d0f71b6db9713a16c2ea4f5886f23 /clippy_lints/src/same_name_method.rs | |
| parent | ed892e72dd05c6dbbd425343f84d1c1d348a898d (diff) | |
Merge commit '0621446356e20fd2ead13a6763bb936c95eb0cfa' into clippy-subtree-update
Diffstat (limited to 'clippy_lints/src/same_name_method.rs')
| -rw-r--r-- | clippy_lints/src/same_name_method.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clippy_lints/src/same_name_method.rs b/clippy_lints/src/same_name_method.rs index 33815cc3bac..226e8ff6adb 100644 --- a/clippy_lints/src/same_name_method.rs +++ b/clippy_lints/src/same_name_method.rs @@ -3,6 +3,7 @@ use rustc_data_structures::fx::FxHashMap; use rustc_hir::def::{DefKind, Res}; use rustc_hir::{HirId, Impl, ItemKind, Node, Path, QPath, TraitRef, TyKind}; use rustc_lint::{LateContext, LateLintPass}; +use rustc_middle::ty::AssocItem; use rustc_session::declare_lint_pass; use rustc_span::Span; use rustc_span::symbol::Symbol; @@ -85,7 +86,7 @@ impl<'tcx> LateLintPass<'tcx> for SameNameMethod { .associated_items(did) .in_definition_order() .filter(|assoc_item| assoc_item.is_fn()) - .map(|assoc_item| assoc_item.name()) + .map(AssocItem::name) .collect() } else { BTreeSet::new() |
