Skip to content

Commit d85b614

Browse files
Add a reference to ilog2 in leading_zeros integer docs
Asked in #104248
1 parent 2afca78 commit d85b614

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

library/core/src/num/int_macros.rs

+4
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ macro_rules! int_impl {
107107

108108
/// Returns the number of leading zeros in the binary representation of `self`.
109109
///
110+
/// The
111+
#[doc = concat!("[`", stringify!($SelfTy), "::ilog2()`]")]
112+
/// function returns a consistent number, even if the type widens.
113+
///
110114
/// # Examples
111115
///
112116
/// Basic usage:

library/core/src/num/uint_macros.rs

+4
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ macro_rules! uint_impl {
109109

110110
/// Returns the number of leading zeros in the binary representation of `self`.
111111
///
112+
/// The
113+
#[doc = concat!("[`", stringify!($SelfTy), "::ilog2()`]")]
114+
/// function returns a consistent number, even if the type widens.
115+
///
112116
/// # Examples
113117
///
114118
/// Basic usage:

src/etc/pre-push.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ unset GIT_DIR
1212
ROOT_DIR="$(git rev-parse --show-toplevel)"
1313
COMMAND="$ROOT_DIR/x.py test tidy"
1414

15-
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
16-
COMMAND="python $COMMAND"
17-
elif ! command -v python &> /dev/null; then
18-
COMMAND="python3 $COMMAND"
19-
fi
15+
16+
COMMAND="python3.10 $COMMAND"
17+
2018

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

0 commit comments

Comments
 (0)