1
Fork 0

Use ThinVec in a few more AST types.

This commit is contained in:
Nicholas Nethercote 2023-01-30 15:39:22 +11:00
parent 549f1c60af
commit 7e855d5f31
11 changed files with 72 additions and 69 deletions

View file

@ -200,7 +200,7 @@ fn cs_clone(
let call = subcall(cx, field);
cx.field_imm(field.span, ident, call)
})
.collect::<Vec<_>>();
.collect::<ThinVec<_>>();
cx.expr_struct(trait_span, ctor_path, fields)
}

View file

@ -249,14 +249,14 @@ pub fn expand_test_or_bench(
cx.expr_struct(
sp,
test_path("TestDescAndFn"),
vec![
thin_vec![
// desc: test::TestDesc {
field(
"desc",
cx.expr_struct(
sp,
test_path("TestDesc"),
vec![
thin_vec![
// name: "path::to::test"
field(
"name",