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

@ -315,8 +315,12 @@ fn mk_main(cx: &mut TestCtxt<'_>) -> P<ast::Item> {
let decl = ecx.fn_decl(vec![], ast::FnRetTy::Ty(main_ret_ty));
let sig = ast::FnSig { decl, header: ast::FnHeader::default(), span: sp };
let def = ast::Defaultness::Final;
let main =
ast::ItemKind::Fn(box ast::FnKind(def, sig, ast::Generics::default(), Some(main_body)));
let main = ast::ItemKind::Fn(Box::new(ast::FnKind(
def,
sig,
ast::Generics::default(),
Some(main_body),
)));
// Honor the reexport_test_harness_main attribute
let main_id = match cx.reexport_test_harness_main {