From b4c1c972d4b482c0ae261f5db48af5c405da2781 Mon Sep 17 00:00:00 2001 From: yvt Date: Mon, 10 Oct 2022 14:14:59 +0900 Subject: [PATCH] fix(script_plugins): the visibility fields of `rustc_hir::intravisit::FnKind` are gone --- components/script_plugins/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs index 498e6027cac..14036184e78 100644 --- a/components/script_plugins/lib.rs +++ b/components/script_plugins/lib.rs @@ -268,7 +268,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass { id: HirId, ) { let in_new_function = match kind { - visit::FnKind::ItemFn(n, _, _, _) | visit::FnKind::Method(n, _, _) => { + visit::FnKind::ItemFn(n, _, _) | visit::FnKind::Method(n, _) => { &*n.as_str() == "new" || n.as_str().starts_with("new_") }, visit::FnKind::Closure => return,