1
Fork 0

Use ThinVec in ast::Block.

This commit is contained in:
Nicholas Nethercote 2023-01-30 14:13:27 +11:00
parent 4143b101f9
commit b14b7ba5dd
18 changed files with 92 additions and 81 deletions

View file

@ -317,9 +317,9 @@ fn mk_main(cx: &mut TestCtxt<'_>) -> P<ast::Item> {
// If no test runner is provided we need to import the test crate
let main_body = if cx.test_runner.is_none() {
ecx.block(sp, vec![test_extern_stmt, call_test_main])
ecx.block(sp, thin_vec![test_extern_stmt, call_test_main])
} else {
ecx.block(sp, vec![call_test_main])
ecx.block(sp, thin_vec![call_test_main])
};
let decl = ecx.fn_decl(ThinVec::new(), ast::FnRetTy::Ty(main_ret_ty));