diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 81f050cb283..0f4555a8605 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -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: diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index 93f65c5c7aa..d5c6a5cee98 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -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: diff --git a/src/etc/pre-push.sh b/src/etc/pre-push.sh index be7de3ebaf5..377e7a9af8b 100755 --- a/src/etc/pre-push.sh +++ b/src/etc/pre-push.sh @@ -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'"