Skip to content

Commit 8fa856f

Browse files
Add a reference to ilog2 in leading_zeros integer docs
Asked in rust-lang#104248
1 parent 0d43771 commit 8fa856f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

core/src/num/int_macros.rs

Lines changed: 4 additions & 0 deletions
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:

core/src/num/uint_macros.rs

Lines changed: 4 additions & 0 deletions
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:

0 commit comments

Comments
 (0)