]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/utils/author.rs
Merge remote-tracking branch 'upstream/master' into rustup
[rust.git] / clippy_lints / src / utils / author.rs
index 65576b7203fdc29638b32ee30c50d36a103418e6..e069de8cb5c7e5148cba5f9789f9e98809c20dde 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));
         });