Sign in
rust
/
rust-lang
/
stdarch
/
1875162b2cb6d3715e12a9bbbe2bfbc806a8269a
/
.
/
stdsimd
/
arch
/
detect
/
bit.rs
blob: c4ec43bb8598e22ac72d133edfb8866367a91bf3 [
file
] [
log
] [
blame
]
//! Bit manipulation utilities.
/// Tests the `bit` of `x`.
#[
allow
(
dead_code
)]
pub
fn
test
(
x
:
usize
,
bit
:
u32
)
->
bool
{
debug_assert
!(
bit
<
32
,
"bit index out-of-bounds"
);
x
&
(
1
<<
bit
)
!=
0
}