Skip to content

Commit 5541456

Browse files
authored
Hint doc use convert::identity relative link
1 parent d890e64 commit 5541456

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/hint.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ pub fn spin_loop() {
9898
/// An identity function that *__hints__* to the compiler to be maximally pessimistic about what
9999
/// `black_box` could do.
100100
///
101-
/// [`std::convert::identity`]: https://doc.rust-lang.org/core/convert/fn.identity.html
102-
///
103101
/// Unlike [`std::convert::identity`], a Rust compiler is encouraged to assume that `black_box` can
104102
/// use `dummy` in any possible valid way that Rust code is allowed to without introducing undefined
105103
/// behavior in the calling code. This property makes `black_box` useful for writing code in which
@@ -108,6 +106,8 @@ pub fn spin_loop() {
108106
/// Note however, that `black_box` is only (and can only be) provided on a "best-effort" basis. The
109107
/// extent to which it can block optimisations may vary depending upon the platform and code-gen
110108
/// backend used. Programs cannot rely on `black_box` for *correctness* in any way.
109+
///
110+
/// [`std::convert::identity`]: ../convert/fn.identity.html
111111
#[cfg_attr(not(miri), inline)]
112112
#[cfg_attr(miri, inline(never))]
113113
#[unstable(feature = "test", issue = "50297")]

0 commit comments

Comments
 (0)