Skip to content

Commit 981bd4c

Browse files
Try another way
1 parent 70c4915 commit 981bd4c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/src/num/int_macros.rs

Lines changed: 2 additions & 2 deletions
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, \

core/src/num/uint_macros.rs

Lines changed: 2 additions & 2 deletions
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, \

0 commit comments

Comments
 (0)