Skip to content

Remove len argument from RawVec::reserve_for_push #122976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix test.
  • Loading branch information
caibear committed Mar 29, 2024
commit 4500c83c62e9fe90b9807006bcd809af1ec940b3
6 changes: 3 additions & 3 deletions tests/codegen/vec_pop_push_noop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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);
}