From 9b4d96a2e29ba2ad382910c89948787c145f4d53 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 16 Apr 2026 20:52:41 -0700 Subject: [PATCH] Avoid `feature(asm_experimental_arch)` on arches that don't need it. Per rust-lang/rust#93335, inline asm is stablized on powerpc and s390x, so avoid using `feature(asm_experimental_arch)` on those architectures. --- src/lib.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8d4a5e521..5008ad7ec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -114,7 +114,15 @@ any(feature = "rustc-dep-of-std", core_intrinsics), feature(core_intrinsics) )] -#![cfg_attr(asm_experimental_arch, feature(asm_experimental_arch))] +#![cfg_attr( + all( + asm_experimental_arch, + not(target_arch = "s390x"), + not(target_arch = "powerpc"), + not(target_arch = "powerpc64") + ), + feature(asm_experimental_arch) +)] #![cfg_attr(not(feature = "all-apis"), allow(dead_code))] // It is common in Linux and libc APIs for types to vary between platforms. #![allow(clippy::unnecessary_cast)]