diff options
| author | bors <bors@rust-lang.org> | 2024-02-26 08:02:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-26 08:02:40 +0000 |
| commit | 7cadf0b2da0d83d5d38c8eddb033acf1508942e0 (patch) | |
| tree | 0cc9d713cfbed1a362010c110d1ba7f421ec2f07 /tests/codegen/slice-ref-equality.rs | |
| parent | 8d74063672a9b1eb283e685cd059187f86d9373d (diff) | |
| parent | db0b49b945f56356ee495cd8b909545d566ef92e (diff) | |
| download | rust-7cadf0b2da0d83d5d38c8eddb033acf1508942e0.tar.gz rust-7cadf0b2da0d83d5d38c8eddb033acf1508942e0.zip | |
Auto merge of #3326 - rust-lang:rustup-2024-02-26, r=RalfJung
Automatic Rustup also fixes https://github.com/rust-lang/miri/issues/3308
Diffstat (limited to 'tests/codegen/slice-ref-equality.rs')
| -rw-r--r-- | tests/codegen/slice-ref-equality.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/codegen/slice-ref-equality.rs b/tests/codegen/slice-ref-equality.rs index 371e685ec6c..85d9c34a30b 100644 --- a/tests/codegen/slice-ref-equality.rs +++ b/tests/codegen/slice-ref-equality.rs @@ -1,8 +1,8 @@ //@ compile-flags: -O -Zmerge-functions=disabled - #![crate_type = "lib"] +#![feature(generic_nonzero)] -use std::num::{NonZeroI16, NonZeroU32}; +use std::num::NonZero; // #71602 reported a simple array comparison just generating a loop. // This was originally fixed by ensuring it generates a single bcmp, @@ -70,7 +70,7 @@ fn eq_slice_of_i32(x: &[i32], y: &[i32]) -> bool { // CHECK-SAME: [[USIZE:i16|i32|i64]] noundef %1 // CHECK-SAME: [[USIZE]] noundef %3 #[no_mangle] -fn eq_slice_of_nonzero(x: &[NonZeroU32], y: &[NonZeroU32]) -> bool { +fn eq_slice_of_nonzero(x: &[NonZero<i32>], y: &[NonZero<i32>]) -> bool { // CHECK: icmp eq [[USIZE]] %1, %3 // CHECK: %[[BYTES:.+]] = shl nsw [[USIZE]] %1, 2 // CHECK: tail call{{( noundef)?}} i32 @{{bcmp|memcmp}}(ptr @@ -82,7 +82,7 @@ fn eq_slice_of_nonzero(x: &[NonZeroU32], y: &[NonZeroU32]) -> bool { // CHECK-SAME: [[USIZE:i16|i32|i64]] noundef %1 // CHECK-SAME: [[USIZE]] noundef %3 #[no_mangle] -fn eq_slice_of_option_of_nonzero(x: &[Option<NonZeroI16>], y: &[Option<NonZeroI16>]) -> bool { +fn eq_slice_of_option_of_nonzero(x: &[Option<NonZero<i16>>], y: &[Option<NonZero<i16>>]) -> bool { // CHECK: icmp eq [[USIZE]] %1, %3 // CHECK: %[[BYTES:.+]] = shl nsw [[USIZE]] %1, 1 // CHECK: tail call{{( noundef)?}} i32 @{{bcmp|memcmp}}(ptr |
