Skip to content

Commit

Permalink
Add StaticForeignItem and use it on ForeignItemKind
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Apr 29, 2024
1 parent 20e40d5 commit fafa690
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3325,11 +3325,11 @@ impl Rewrite for ast::ForeignItem {
.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,
Expand All @@ -3340,7 +3340,7 @@ impl Rewrite for ast::ForeignItem {
rewrite_assign_rhs(
context,
prefix,
&**ty,
&static_foreign_item.ty,
&RhsAssignKind::Ty,
shape.sub_width(1)?,
)
Expand Down

0 comments on commit fafa690

Please sign in to comment.