1
Fork 0

Use generic NonZero in tests.

This commit is contained in:
Markus Reiter 2024-02-22 14:59:52 +01:00
parent 710048f790
commit b2fbb8a053
No known key found for this signature in database
GPG key ID: 245293B51702655B
43 changed files with 519 additions and 516 deletions

View file

@ -1,7 +1,7 @@
//@ compile-flags: -O -Z merge-functions=disabled
//@ only-x86_64
#![crate_type = "lib"]
#![feature(generic_nonzero)]
// CHECK-LABEL: @array_eq_value
#[no_mangle]
@ -63,7 +63,7 @@ pub fn array_eq_zero_short(x: [u16; 3]) -> bool {
// CHECK-LABEL: @array_eq_none_short(i40
#[no_mangle]
pub fn array_eq_none_short(x: [Option<std::num::NonZeroU8>; 5]) -> bool {
pub fn array_eq_none_short(x: [Option<std::num::NonZero<u8>>; 5]) -> bool {
// CHECK-NEXT: start:
// CHECK-NEXT: %[[EQ:.+]] = icmp eq i40 %0, 0
// CHECK-NEXT: ret i1 %[[EQ]]