Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a reference to ilog2 in leading_zeros integer docs #104263

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions library/core/src/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ macro_rules! int_impl {

/// 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
///
/// Basic usage:
Expand Down
4 changes: 4 additions & 0 deletions library/core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ macro_rules! uint_impl {

/// 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
///
/// Basic usage:
Expand Down
8 changes: 3 additions & 5 deletions src/etc/pre-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ unset GIT_DIR
ROOT_DIR="$(git rev-parse --show-toplevel)"
COMMAND="$ROOT_DIR/x.py test tidy"

if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
COMMAND="python $COMMAND"
elif ! command -v python &> /dev/null; then
COMMAND="python3 $COMMAND"
fi

COMMAND="python3.10 $COMMAND"


echo "Running pre-push script '$COMMAND'"

Expand Down