Use FnSig instead of raw FnDecl for ForeignItemKind::Fn

This commit is contained in:
Michael Goulet
2024-08-07 13:01:34 -04:00
parent a73bc4a131
commit 833af65f38
23 changed files with 113 additions and 98 deletions

View File

@@ -352,16 +352,11 @@ impl<'a> State<'a> {
self.maybe_print_comment(item.span.lo());
self.print_outer_attributes(self.attrs(item.hir_id()));
match item.kind {
hir::ForeignItemKind::Fn(decl, arg_names, generics, safety) => {
hir::ForeignItemKind::Fn(sig, arg_names, generics) => {
self.head("");
self.print_fn(
decl,
hir::FnHeader {
safety,
constness: hir::Constness::NotConst,
abi: Abi::Rust,
asyncness: hir::IsAsync::NotAsync,
},
sig.decl,
sig.header,
Some(item.ident.name),
generics,
arg_names,