diff options
| author | Philipp Krones <hello@philkrones.com> | 2023-11-02 17:01:56 +0100 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2023-11-02 17:24:19 +0100 |
| commit | 95dc7be92f8087ae3c8b9532f2674dabceee3d4d (patch) | |
| tree | ef0c270a62fecc20762256ced06e1a8db9ccb74c /clippy_lints/src/same_name_method.rs | |
| parent | 2e907aa90c67d73fadc9be54c6609f618045c10c (diff) | |
| parent | 01a0a3666681b88c3cab5ffc440bdd74352093dd (diff) | |
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'clippy_lints/src/same_name_method.rs')
| -rw-r--r-- | clippy_lints/src/same_name_method.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clippy_lints/src/same_name_method.rs b/clippy_lints/src/same_name_method.rs index a37e2772d35..d7fd3163801 100644 --- a/clippy_lints/src/same_name_method.rs +++ b/clippy_lints/src/same_name_method.rs @@ -18,7 +18,7 @@ declare_clippy_lint! { /// Confusing. /// /// ### Example - /// ```rust + /// ```no_run /// trait T { /// fn foo(&self) {} /// } @@ -55,11 +55,11 @@ impl<'tcx> LateLintPass<'tcx> for SameNameMethod { if matches!(cx.tcx.def_kind(id.owner_id), DefKind::Impl { .. }) && let item = cx.tcx.hir().item(id) && let ItemKind::Impl(Impl { - items, - of_trait, - self_ty, - .. - }) = &item.kind + items, + of_trait, + self_ty, + .. + }) = &item.kind && let TyKind::Path(QPath::Resolved(_, Path { res, .. })) = self_ty.kind { if !map.contains_key(res) { |
