From 4b6bbcbaa35e61db72424bbd161c01f50f860bbc Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Tue, 16 Apr 2024 12:39:53 +0000 Subject: [PATCH] Fixup 2 ui tests using changed intrinsics --- tests/ui/intrinsics/bad-intrinsic-monomorphization.rs | 2 +- tests/ui/intrinsics/intrinsics-integer.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/ui/intrinsics/bad-intrinsic-monomorphization.rs b/tests/ui/intrinsics/bad-intrinsic-monomorphization.rs index fa9cbe4400c..254ac24f0b9 100644 --- a/tests/ui/intrinsics/bad-intrinsic-monomorphization.rs +++ b/tests/ui/intrinsics/bad-intrinsic-monomorphization.rs @@ -16,7 +16,7 @@ #[derive(Copy, Clone)] pub struct Foo(i64); -pub fn test_cttz(v: Foo) -> Foo { +pub fn test_cttz(v: Foo) -> u32 { intrinsics::cttz(v) //~^ ERROR `cttz` intrinsic: expected basic integer type, found `Foo` } diff --git a/tests/ui/intrinsics/intrinsics-integer.rs b/tests/ui/intrinsics/intrinsics-integer.rs index bfd7e4714fe..7dbc4b8b7ce 100644 --- a/tests/ui/intrinsics/intrinsics-integer.rs +++ b/tests/ui/intrinsics/intrinsics-integer.rs @@ -6,13 +6,13 @@ mod rusti { extern "rust-intrinsic" { #[rustc_safe_intrinsic] - pub fn ctpop(x: T) -> T; + pub fn ctpop(x: T) -> u32; #[rustc_safe_intrinsic] - pub fn ctlz(x: T) -> T; - pub fn ctlz_nonzero(x: T) -> T; + pub fn ctlz(x: T) -> u32; + pub fn ctlz_nonzero(x: T) -> u32; #[rustc_safe_intrinsic] - pub fn cttz(x: T) -> T; - pub fn cttz_nonzero(x: T) -> T; + pub fn cttz(x: T) -> u32; + pub fn cttz_nonzero(x: T) -> u32; #[rustc_safe_intrinsic] pub fn bswap(x: T) -> T; #[rustc_safe_intrinsic]