]> 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 1489c96d9e9b03bcb61a8bb8cd84fb7a0977be97..e069de8cb5c7e5148cba5f9789f9e98809c20dde 100644 (file)
@@ -140,9 +140,9 @@ 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));
+            v.expr(&v.bind("expr", hir.body(body_id).value));
         });
     }
 }
@@ -739,7 +739,7 @@ fn inner(s: &mut String, path: &QPath<'_>) {
                     *s += ", ";
                     write!(s, "{:?}", segment.ident.as_str()).unwrap();
                 },
-                other => write!(s, "/* unimplemented: {:?}*/", other).unwrap(),
+                other => write!(s, "/* unimplemented: {other:?}*/").unwrap(),
             },
             QPath::LangItem(..) => panic!("path_to_string: called for lang item qpath"),
         }