Add a reference to ilog2 in leading_zeros integer docs
Asked in #104248
This commit is contained in:
parent
2afca78a0b
commit
d85b61460a
@ -107,6 +107,10 @@ macro_rules! int_impl {
|
|||||||
|
|
||||||
/// Returns the number of leading zeros in the binary representation of `self`.
|
/// Returns the number of leading zeros in the binary representation of `self`.
|
||||||
///
|
///
|
||||||
|
/// The
|
||||||
|
#[doc = concat!("[`", stringify!($SelfTy), "::ilog2()`]")]
|
||||||
|
/// function returns a consistent number, even if the type widens.
|
||||||
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// Basic usage:
|
/// Basic usage:
|
||||||
|
@ -109,6 +109,10 @@ macro_rules! uint_impl {
|
|||||||
|
|
||||||
/// Returns the number of leading zeros in the binary representation of `self`.
|
/// Returns the number of leading zeros in the binary representation of `self`.
|
||||||
///
|
///
|
||||||
|
/// The
|
||||||
|
#[doc = concat!("[`", stringify!($SelfTy), "::ilog2()`]")]
|
||||||
|
/// function returns a consistent number, even if the type widens.
|
||||||
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// Basic usage:
|
/// Basic usage:
|
||||||
|
@ -12,11 +12,9 @@ unset GIT_DIR
|
|||||||
ROOT_DIR="$(git rev-parse --show-toplevel)"
|
ROOT_DIR="$(git rev-parse --show-toplevel)"
|
||||||
COMMAND="$ROOT_DIR/x.py test tidy"
|
COMMAND="$ROOT_DIR/x.py test tidy"
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
|
|
||||||
COMMAND="python $COMMAND"
|
COMMAND="python3.10 $COMMAND"
|
||||||
elif ! command -v python &> /dev/null; then
|
|
||||||
COMMAND="python3 $COMMAND"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Running pre-push script '$COMMAND'"
|
echo "Running pre-push script '$COMMAND'"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user