diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-02 20:15:28 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-13 13:50:01 +0000 |
| commit | 8510965e6be8539fe330aa85a48f462db8799e69 (patch) | |
| tree | 51723d9b18413ebe046f3172124dc3be04556fd8 /clippy_lints/src/missing_inline.rs | |
| parent | de43d8cc6fbf54488c1a011102525bcca6814b43 (diff) | |
Retire hir::*ItemRef.
Diffstat (limited to 'clippy_lints/src/missing_inline.rs')
| -rw-r--r-- | clippy_lints/src/missing_inline.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clippy_lints/src/missing_inline.rs b/clippy_lints/src/missing_inline.rs index 25c95d23436..329f7193437 100644 --- a/clippy_lints/src/missing_inline.rs +++ b/clippy_lints/src/missing_inline.rs @@ -104,16 +104,16 @@ impl<'tcx> LateLintPass<'tcx> for MissingInline { hir::ItemKind::Trait(ref _is_auto, ref _unsafe, _ident, _generics, _bounds, trait_items) => { // note: we need to check if the trait is exported so we can't use // `LateLintPass::check_trait_item` here. - for tit in trait_items { - let tit_ = cx.tcx.hir_trait_item(tit.id); + for &tit in trait_items { + let tit_ = cx.tcx.hir_trait_item(tit); match tit_.kind { hir::TraitItemKind::Const(..) | hir::TraitItemKind::Type(..) => {}, hir::TraitItemKind::Fn(..) => { - if cx.tcx.defaultness(tit.id.owner_id).has_value() { + if cx.tcx.defaultness(tit.owner_id).has_value() { // trait method with default body needs inline in case // an impl is not provided let desc = "a default trait method"; - let item = cx.tcx.hir_trait_item(tit.id); + let item = cx.tcx.hir_trait_item(tit); let attrs = cx.tcx.hir_attrs(item.hir_id()); check_missing_inline_attrs(cx, attrs, item.span, desc); } |
