Sign in
android
/
toolchain
/
rustc
/
da60c8575e02ed54fcffcb7f2f9289b4705b60ff
/
.
/
src
/
tools
/
rustfmt
/
tests
/
source
/
cfg_if
/
detect
/
bit.rs
blob: 578f0b16b742ae5eb16ffc1b99f41c6b88dcf2cc [
file
] [
log
] [
blame
]
//! Bit manipulation utilities.
/// Tests the `bit` of `x`.
#[
allow
(
dead_code
)]
#[
inline
]
pub
(
crate
)
fn
test
(
x
:
usize
,
bit
:
u32
)
->
bool
{
debug_assert
!(
bit
<
32
,
"bit index out-of-bounds"
);
x
&
(
1
<<
bit
)
!=
0
}