diff options
| author | est31 <MTest31@outlook.com> | 2021-08-05 03:53:21 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2021-08-18 09:25:26 +0200 |
| commit | 489744f90052960dbf8e8f8c502a16e5bafd15a1 (patch) | |
| tree | 0e482f3b08fe09b17f0ec158857e86bce56b30d9 /compiler/rustc_builtin_macros/src/global_allocator.rs | |
| parent | 1cd1cd034b6501cbfbd78a4d034e74aa188fb00e (diff) | |
| download | rust-489744f90052960dbf8e8f8c502a16e5bafd15a1.tar.gz rust-489744f90052960dbf8e8f8c502a16e5bafd15a1.zip | |
Remove box syntax from rustc_builtin_macros
Diffstat (limited to 'compiler/rustc_builtin_macros/src/global_allocator.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/global_allocator.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_builtin_macros/src/global_allocator.rs b/compiler/rustc_builtin_macros/src/global_allocator.rs index a97cac7e514..3f71ee6f489 100644 --- a/compiler/rustc_builtin_macros/src/global_allocator.rs +++ b/compiler/rustc_builtin_macros/src/global_allocator.rs @@ -85,8 +85,12 @@ impl AllocFnFactory<'_, '_> { let header = FnHeader { unsafety: Unsafe::Yes(self.span), ..FnHeader::default() }; let sig = FnSig { decl, header, span: self.span }; let block = Some(self.cx.block_expr(output_expr)); - let kind = - ItemKind::Fn(box FnKind(ast::Defaultness::Final, sig, Generics::default(), block)); + let kind = ItemKind::Fn(Box::new(FnKind( + ast::Defaultness::Final, + sig, + Generics::default(), + block, + ))); let item = self.cx.item( self.span, Ident::from_str_and_span(&self.kind.fn_name(method.name), self.span), |
