Skip to content

Commit cf1c403

Browse files
authored
Merge pull request #2206 from ChrisDenton/clippy
Fix or allow clippy lints in `core_arch`
2 parents d9f006e + 3683b1f commit cf1c403

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎crates/core_arch/src/lib.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@
6060
clippy::shadow_reuse,
6161
clippy::similar_names,
6262
clippy::unusual_byte_groupings,
63-
clippy::wrong_self_convention
63+
clippy::wrong_self_convention,
64+
clippy::zero_prefixed_literal,
65+
clippy::tabs_in_doc_comments
6466
)]
6567
#![cfg_attr(test, allow(unused_imports))]
6668
#![no_std]

‎crates/core_arch/src/x86/bmi1.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub const fn _andn_u32(a: u32, b: u32) -> u32 {
6060
#[stable(feature = "simd_x86", since = "1.27.0")]
6161
#[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")]
6262
pub const fn _blsi_u32(x: u32) -> u32 {
63-
x & x.wrapping_neg()
63+
x.isolate_lowest_one()
6464
}
6565

6666
/// Gets mask up to lowest set bit.

‎crates/core_arch/src/x86_64/bmi.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub const fn _andn_u64(a: u64, b: u64) -> u64 {
6363
#[stable(feature = "simd_x86", since = "1.27.0")]
6464
#[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")]
6565
pub const fn _blsi_u64(x: u64) -> u64 {
66-
x & x.wrapping_neg()
66+
x.isolate_lowest_one()
6767
}
6868

6969
/// Gets mask up to lowest set bit.

0 commit comments

Comments
 (0)