From 7aa4b69885ea062923d73ac2001e604713674a95 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Wed, 12 Aug 2026 01:44:03 +0000 Subject: [PATCH 1/2] clippy::manual_isolate_lowest_one --- crates/core_arch/src/x86/bmi1.rs | 2 +- crates/core_arch/src/x86_64/bmi.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core_arch/src/x86/bmi1.rs b/crates/core_arch/src/x86/bmi1.rs index 21da03667f..ccacd34f3c 100644 --- a/crates/core_arch/src/x86/bmi1.rs +++ b/crates/core_arch/src/x86/bmi1.rs @@ -60,7 +60,7 @@ pub const fn _andn_u32(a: u32, b: u32) -> u32 { #[stable(feature = "simd_x86", since = "1.27.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _blsi_u32(x: u32) -> u32 { - x & x.wrapping_neg() + x.isolate_lowest_one() } /// Gets mask up to lowest set bit. diff --git a/crates/core_arch/src/x86_64/bmi.rs b/crates/core_arch/src/x86_64/bmi.rs index f082953f9d..d7f96bbc67 100644 --- a/crates/core_arch/src/x86_64/bmi.rs +++ b/crates/core_arch/src/x86_64/bmi.rs @@ -63,7 +63,7 @@ pub const fn _andn_u64(a: u64, b: u64) -> u64 { #[stable(feature = "simd_x86", since = "1.27.0")] #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] pub const fn _blsi_u64(x: u64) -> u64 { - x & x.wrapping_neg() + x.isolate_lowest_one() } /// Gets mask up to lowest set bit. From 3683b1f5d39735b63039e8891e4e3737f3f52bc0 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Wed, 12 Aug 2026 01:44:31 +0000 Subject: [PATCH 2/2] Allow some noisy clippy lints --- crates/core_arch/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/core_arch/src/lib.rs b/crates/core_arch/src/lib.rs index 0991ec1acf..57eca221e1 100644 --- a/crates/core_arch/src/lib.rs +++ b/crates/core_arch/src/lib.rs @@ -60,7 +60,9 @@ clippy::shadow_reuse, clippy::similar_names, clippy::unusual_byte_groupings, - clippy::wrong_self_convention + clippy::wrong_self_convention, + clippy::zero_prefixed_literal, + clippy::tabs_in_doc_comments )] #![cfg_attr(test, allow(unused_imports))] #![no_std]