Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Nikita Popov <github@npopov.com>
  • Loading branch information
tesuji and nikic authored Jun 7, 2024
1 parent f711bee commit eee85d7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/assembly/issue-83585-small-pod-struct-equality.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type T2 = [T; 8];
#[no_mangle]
// CHECK-LABEL: foo1a
// CHECK: cmp
// CHECK-NEXT: set
// CHECK-NEXT: sete
// CHECK-NEXT: ret
pub fn foo1a(a: T1, b: T1) -> bool {
a == b
Expand All @@ -22,7 +22,7 @@ pub fn foo1a(a: T1, b: T1) -> bool {
// CHECK-LABEL: foo1b
// CHECK: mov
// CHECK-NEXT: cmp
// CHECK-NEXT: set
// CHECK-NEXT: sete
// CHECK-NEXT: ret
pub fn foo1b(a: &T1, b: &T1) -> bool {
a == b
Expand Down
4 changes: 2 additions & 2 deletions tests/codegen/issues/issue-36010-some-box-is_some.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ fn foo<T>(a: &mut T, b: T) -> bool {

// CHECK-LABEL: @foo_u32
// CHECK: store i32
// CHECK-NEXT: ret i1
// CHECK-NEXT: ret i1 true
#[no_mangle]
pub fn foo_u32(a: &mut u32, b: u32) -> bool {
foo(a, b)
}

// CHECK-LABEL: @foo_box
// CHECK: store ptr
// CHECK-NEXT: ret i1
// CHECK-NEXT: ret i1 true
#[no_mangle]
pub fn foo_box(a: &mut Box<u32>, b: Box<u32>) -> bool {
foo(a, b)
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen/issues/issue-74938-array-split-at.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub type T = u8;
#[no_mangle]
// CHECK-LABEL: @split_mutiple
// CHECK-NOT: unreachable
pub fn split_mutiple(slice: &[T]) -> (&[T], &[T]) {
pub fn split_multiple(slice: &[T]) -> (&[T], &[T]) {
let len = slice.len() / N;
slice.split_at(len * N)
}
2 changes: 1 addition & 1 deletion tests/codegen/slice-pointer-nonnull-unwrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use std::ptr::NonNull;

// CHECK-LABEL: @slice_ptr_len_1
// CHECK: {{.*}}:
// CHECK-NEXT: {{.*}}:
// CHECK-NEXT: ret i64 %ptr.1
#[no_mangle]
pub fn slice_ptr_len_1(ptr: *const [u8]) -> usize {
Expand Down

0 comments on commit eee85d7

Please sign in to comment.