diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-30 06:43:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-30 06:43:42 +0200 |
| commit | 27d320d1b6eaae25f8df5e2f6fe1ecc50c7da3eb (patch) | |
| tree | 7a9b1f33699712d19b319137d5ddd228f4084029 /src | |
| parent | 997d5f2bec55c711fd9aeaac7bc5d7b65144dbcf (diff) | |
| parent | fafa690716ca2a6495e53fb3317ace76fc98061f (diff) | |
| download | rust-27d320d1b6eaae25f8df5e2f6fe1ecc50c7da3eb.tar.gz rust-27d320d1b6eaae25f8df5e2f6fe1ecc50c7da3eb.zip | |
Rollup merge of #124524 - spastorino:make-foreign-static-use-struct, r=oli-obk
Add StaticForeignItem and use it on ForeignItemKind This is in preparation for unsafe extern blocks that adds a safe variant for functions inside extern blocks. r? `@oli-obk` cc `@compiler-errors`
Diffstat (limited to 'src')
| -rw-r--r-- | src/items.rs | 6 |
1 files 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 @@ 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, @@ -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)?, ) |
