Skip to content

Commit a1909b7

Browse files
Try another way
1 parent fb98796 commit a1909b7

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

library/core/src/num/int_macros.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ macro_rules! int_impl {
108108
/// Returns the number of leading zeros in the binary representation of `self`.
109109
///
110110
/// Depending on what you're doing with the value, you might also be interested in the
111-
#[doc = concat!("[`", stringify!($SelfTy), "::ilog2()`]")]
112-
/// function which returns a consistent number, even if the type widens.
111+
/// [`ilog2`] function which returns a consistent number, even if the type widens.
113112
///
114113
/// # Examples
115114
///
@@ -120,6 +119,7 @@ macro_rules! int_impl {
120119
///
121120
/// assert_eq!(n.leading_zeros(), 0);
122121
/// ```
122+
#[doc = concat!("[`ilog2`]: ", stringify!($SelfT), "::ilog2")]
123123
#[stable(feature = "rust1", since = "1.0.0")]
124124
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
125125
#[must_use = "this returns the result of the operation, \

library/core/src/num/uint_macros.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ macro_rules! uint_impl {
110110
/// Returns the number of leading zeros in the binary representation of `self`.
111111
///
112112
/// Depending on what you're doing with the value, you might also be interested in the
113-
#[doc = concat!("[`", stringify!($SelfTy), "::ilog2()`]")]
114-
/// function which returns a consistent number, even if the type widens.
113+
/// [`ilog2`] function which returns a consistent number, even if the type widens.
115114
///
116115
/// # Examples
117116
///
@@ -122,6 +121,7 @@ macro_rules! uint_impl {
122121
///
123122
/// assert_eq!(n.leading_zeros(), 2);
124123
/// ```
124+
#[doc = concat!("[`ilog2`]: ", stringify!($SelfT), "::ilog2")]
125125
#[stable(feature = "rust1", since = "1.0.0")]
126126
#[rustc_const_stable(feature = "const_math", since = "1.32.0")]
127127
#[must_use = "this returns the result of the operation, \

src/etc/pre-push.sh

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

15-
16-
COMMAND="python3.10 $COMMAND"
17-
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
1820

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

0 commit comments

Comments
 (0)