From b2fbb8a05392be976c67e3b0063203d5b049da5c Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 22 Feb 2024 14:59:52 +0100 Subject: Use generic `NonZero` in tests. --- tests/codegen/function-arguments.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/codegen/function-arguments.rs') diff --git a/tests/codegen/function-arguments.rs b/tests/codegen/function-arguments.rs index 88cedcf46b6..b75c188f51a 100644 --- a/tests/codegen/function-arguments.rs +++ b/tests/codegen/function-arguments.rs @@ -1,10 +1,10 @@ //@ compile-flags: -O -C no-prepopulate-passes - #![crate_type = "lib"] #![feature(dyn_star)] +#![feature(generic_nonzero)] use std::mem::MaybeUninit; -use std::num::NonZeroU64; +use std::num::NonZero; use std::marker::PhantomPinned; use std::ptr::NonNull; @@ -70,13 +70,13 @@ pub fn int(x: u64) -> u64 { // CHECK: noundef i64 @nonzero_int(i64 noundef %x) #[no_mangle] -pub fn nonzero_int(x: NonZeroU64) -> NonZeroU64 { +pub fn nonzero_int(x: NonZero) -> NonZero { x } // CHECK: noundef i64 @option_nonzero_int(i64 noundef %x) #[no_mangle] -pub fn option_nonzero_int(x: Option) -> Option { +pub fn option_nonzero_int(x: Option>) -> Option> { x } -- cgit 1.4.1-3-g733a5