From fafa690716ca2a6495e53fb3317ace76fc98061f Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Mon, 29 Apr 2024 11:27:14 -0300 Subject: [PATCH] Add StaticForeignItem and use it on ForeignItemKind --- src/items.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/items.rs b/src/items.rs index f6f51fbd8ea..e196d1817f3 100644 --- a/src/items.rs +++ b/src/items.rs @@ -3325,11 +3325,11 @@ fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option .map(|(s, _, _)| format!("{};", s)) } } - ast::ForeignItemKind::Static(ref ty, mutability, _) => { + ast::ForeignItemKind::Static(ref static_foreign_item) => { // FIXME(#21): we're dropping potential comments in between the // function kw here. let vis = format_visibility(context, &self.vis); - let mut_str = format_mutability(mutability); + let mut_str = format_mutability(static_foreign_item.mutability); let prefix = format!( "{}static {}{}:", vis, @@ -3340,7 +3340,7 @@ fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option rewrite_assign_rhs( context, prefix, - &**ty, + &static_foreign_item.ty, &RhsAssignKind::Ty, shape.sub_width(1)?, )