X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=clippy_lints%2Fsrc%2Futils%2Fauthor.rs;h=e069de8cb5c7e5148cba5f9789f9e98809c20dde;hb=bbcde666853d11f6f5f3bdc660f018cf7fc8cd71;hp=65576b7203fdc29638b32ee30c50d36a103418e6;hpb=d31db02e477b642b0caf3057d034663d306fa733;p=rust.git diff --git a/clippy_lints/src/utils/author.rs b/clippy_lints/src/utils/author.rs index 65576b7203f..e069de8cb5c 100644 --- a/clippy_lints/src/utils/author.rs +++ b/clippy_lints/src/utils/author.rs @@ -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)); });