From dd50f454c8090c65ee6c551facf8d3dbf0de79c9 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Sat, 20 Apr 2024 03:22:54 +0000 Subject: [PATCH] Fixup `rustc_codegen_gcc` test signature --- example/example.rs | 7 ++++--- example/mini_core.rs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/example/example.rs b/example/example.rs index 5878e8548d9..7c21b73b630 100644 --- a/example/example.rs +++ b/example/example.rs @@ -153,9 +153,10 @@ unsafe fn deref_str_ptr(s: *const str) -> &'static str { arr } -unsafe fn use_ctlz_nonzero(a: u16) -> u16 { - intrinsics::ctlz_nonzero(a) -} +// FIXME: fix the intrinsic implementation to work with the new ->u32 signature +// unsafe fn use_ctlz_nonzero(a: u16) -> u32 { +// intrinsics::ctlz_nonzero(a) +// } fn ptr_as_usize(ptr: *const u8) -> usize { ptr as usize diff --git a/example/mini_core.rs b/example/mini_core.rs index 4665009e191..8ffa66a4894 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -593,7 +593,7 @@ pub mod intrinsics { pub fn min_align_of_val(val: *const T) -> usize; pub fn copy(src: *const T, dst: *mut T, count: usize); pub fn transmute(e: T) -> U; - pub fn ctlz_nonzero(x: T) -> T; + pub fn ctlz_nonzero(x: T) -> u32; #[rustc_safe_intrinsic] pub fn needs_drop() -> bool; #[rustc_safe_intrinsic]