1
Fork 0

Remove box syntax from rustc_builtin_macros

This commit is contained in:
est31 2021-08-05 03:53:21 +02:00
parent 1cd1cd034b
commit 489744f900
5 changed files with 24 additions and 12 deletions

View file

@ -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),