diff options
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/entry.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/intrinsic.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/wfcheck.rs | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/entry.rs b/compiler/rustc_hir_analysis/src/check/entry.rs index 245085b332c..332ac2fa0c0 100644 --- a/compiler/rustc_hir_analysis/src/check/entry.rs +++ b/compiler/rustc_hir_analysis/src/check/entry.rs @@ -44,7 +44,7 @@ fn check_main_fn_ty(tcx: TyCtxt<'_>, main_def_id: DefId) { return None; } match tcx.hir_node_by_def_id(def_id.expect_local()) { - Node::Item(hir::Item { kind: hir::ItemKind::Fn(_, generics, _), .. }) => { + Node::Item(hir::Item { kind: hir::ItemKind::Fn { generics, .. }, .. }) => { generics.params.is_empty().not().then_some(generics.span) } _ => { @@ -58,7 +58,7 @@ fn check_main_fn_ty(tcx: TyCtxt<'_>, main_def_id: DefId) { return None; } match tcx.hir_node_by_def_id(def_id.expect_local()) { - Node::Item(hir::Item { kind: hir::ItemKind::Fn(_, generics, _), .. }) => { + Node::Item(hir::Item { kind: hir::ItemKind::Fn { generics, .. }, .. }) => { Some(generics.where_clause_span) } _ => { @@ -79,7 +79,7 @@ fn check_main_fn_ty(tcx: TyCtxt<'_>, main_def_id: DefId) { return None; } match tcx.hir_node_by_def_id(def_id.expect_local()) { - Node::Item(hir::Item { kind: hir::ItemKind::Fn(fn_sig, _, _), .. }) => { + Node::Item(hir::Item { kind: hir::ItemKind::Fn { sig: fn_sig, .. }, .. }) => { Some(fn_sig.decl.output.span()) } _ => { @@ -201,7 +201,7 @@ fn check_start_fn_ty(tcx: TyCtxt<'_>, start_def_id: DefId) { match start_t.kind() { ty::FnDef(..) => { if let Node::Item(it) = tcx.hir_node(start_id) { - if let hir::ItemKind::Fn(sig, generics, _) = &it.kind { + if let hir::ItemKind::Fn { sig, generics, .. } = &it.kind { let mut error = false; if !generics.params.is_empty() { tcx.dcx().emit_err(errors::StartFunctionParameters { span: generics.span }); diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index fd78bf3e8fc..747431e5312 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -26,7 +26,7 @@ fn equate_intrinsic_type<'tcx>( sig: ty::PolyFnSig<'tcx>, ) { let (generics, span) = match tcx.hir_node_by_def_id(def_id) { - hir::Node::Item(hir::Item { kind: hir::ItemKind::Fn(_, generics, _), .. }) + hir::Node::Item(hir::Item { kind: hir::ItemKind::Fn { generics, .. }, .. }) | hir::Node::ForeignItem(hir::ForeignItem { kind: hir::ForeignItemKind::Fn(_, _, generics), .. diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index efffb24c81d..81a5e9ee90d 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -293,7 +293,7 @@ fn check_item<'tcx>(tcx: TyCtxt<'tcx>, item: &'tcx hir::Item<'tcx>) -> Result<() } res } - hir::ItemKind::Fn(ref sig, ..) => { + hir::ItemKind::Fn { sig, .. } => { check_item_fn(tcx, def_id, item.ident, item.span, sig.decl) } hir::ItemKind::Static(ty, ..) => { |
