diff options
| author | bors <bors@rust-lang.org> | 2024-03-30 00:29:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-30 00:29:24 +0000 |
| commit | 877d36b1928b5a4f7d193517b48290ecbe404d71 (patch) | |
| tree | 55673ca0ab72dc8ff30e308b1d937b7b3e477cf7 /tests/codegen | |
| parent | a3cfa031fa7726a957d73e6cad5744eb9706f56d (diff) | |
| parent | 4500c83c62e9fe90b9807006bcd809af1ec940b3 (diff) | |
Auto merge of #122976 - caibear:optimize_reserve_for_push, r=cuviper
Remove len argument from RawVec::reserve_for_push Removes `RawVec::reserve_for_push`'s `len` argument since it's always the same as capacity. Also makes `Vec::insert` use `RawVec::reserve_for_push`.
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/vec_pop_push_noop.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/codegen/vec_pop_push_noop.rs b/tests/codegen/vec_pop_push_noop.rs index 83765d10854..4d76c24a9d9 100644 --- a/tests/codegen/vec_pop_push_noop.rs +++ b/tests/codegen/vec_pop_push_noop.rs @@ -5,10 +5,10 @@ #[no_mangle] // CHECK-LABEL: @noop( pub fn noop(v: &mut Vec<u8>) { - // CHECK-NOT: reserve_for_push + // CHECK-NOT: grow_one // CHECK-NOT: call // CHECK: tail call void @llvm.assume - // CHECK-NOT: reserve_for_push + // CHECK-NOT: grow_one // CHECK-NOT: call // CHECK: ret if let Some(x) = v.pop() { @@ -19,6 +19,6 @@ pub fn noop(v: &mut Vec<u8>) { #[no_mangle] // CHECK-LABEL: @push_byte( pub fn push_byte(v: &mut Vec<u8>) { - // CHECK: call {{.*}}reserve_for_push + // CHECK: call {{.*}}grow_one v.push(3); } |
