diff options
| author | Ralf Jung <post@ralfj.de> | 2025-01-04 11:30:31 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-01-04 11:35:31 +0100 |
| commit | be65012aa34aa3b8d27e0e372b9eb86743d5aa8f (patch) | |
| tree | dc1f494a710d956e2ea18047b87a81225857db00 /compiler/rustc_ast_lowering/src | |
| parent | c528b8c67895bfe7fdcdfeb56ec5bf6ef928dcd7 (diff) | |
turn hir::ItemKind::Fn into a named-field variant
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/item.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index 2cf6a2a909b..74a02eebd02 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -233,7 +233,7 @@ impl<'hir> LoweringContext<'_, 'hir> { header: this.lower_fn_header(*header, hir::Safety::Safe), span: this.lower_span(*fn_sig_span), }; - hir::ItemKind::Fn(sig, generics, body_id) + hir::ItemKind::Fn { sig, generics, body: body_id } }) } ItemKind::Mod(_, mod_kind) => match mod_kind { @@ -435,11 +435,11 @@ impl<'hir> LoweringContext<'_, 'hir> { } ItemKind::Delegation(box delegation) => { let delegation_results = self.lower_delegation(delegation, id); - hir::ItemKind::Fn( - delegation_results.sig, - delegation_results.generics, - delegation_results.body_id, - ) + hir::ItemKind::Fn { + sig: delegation_results.sig, + generics: delegation_results.generics, + body: delegation_results.body_id, + } } ItemKind::MacCall(..) | ItemKind::DelegationMac(..) => { panic!("macros should have been expanded by now") |
