]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/utils/author.rs
Rollup merge of #102214 - cassaundra:fix-format-args-span, r=cjgillot
[rust.git] / src / tools / clippy / clippy_lints / src / utils / author.rs
index 4003fff27c006a7d5956aa6094406fc4f1f735eb..1df3135c962d122c9ecc6064fd0a8733d83be17d 100644 (file)
@@ -140,7 +140,7 @@ fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) {
 
 fn check_item(cx: &LateContext<'_>, hir_id: HirId) {
     let hir = cx.tcx.hir();
-    if let Some(body_id) = hir.maybe_body_owned_by(hir_id.expect_owner()) {
+    if let Some(body_id) = hir.maybe_body_owned_by(hir_id.expect_owner().def_id) {
         check_node(cx, hir_id, |v| {
             v.expr(&v.bind("expr", hir.body(body_id).value));
         });