From 3c2eb18b9ba287284f5f08f8c256154354c55c64 Mon Sep 17 00:00:00 2001 From: Denis Vasilik Date: Tue, 11 Aug 2020 22:16:31 +0200 Subject: [PATCH 1/3] Use intra-doc links --- library/core/src/hint.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/core/src/hint.rs b/library/core/src/hint.rs index 3dc0ee2b55530..9ee50a9051013 100644 --- a/library/core/src/hint.rs +++ b/library/core/src/hint.rs @@ -24,7 +24,7 @@ use crate::intrinsics; /// Otherwise, consider using the [`unreachable!`] macro, which does not allow /// optimizations but will panic when executed. /// -/// [`unreachable!`]: ../macro.unreachable.html +/// [`unreachable!`]: unreachable /// /// # Example /// @@ -61,7 +61,7 @@ pub const unsafe fn unreachable_unchecked() -> ! { /// **Note**: On platforms that do not support receiving spin-loop hints this function does not /// do anything at all. /// -/// [`core::sync::atomic::spin_loop_hint`]: ../sync/atomic/fn.spin_loop_hint.html +/// [`core::sync::atomic::spin_loop_hint`]: crate::sync::atomic::spin_loop_hint #[inline] #[unstable(feature = "renamed_spin_loop", issue = "55002")] pub fn spin_loop() { @@ -99,7 +99,7 @@ pub fn spin_loop() { /// An identity function that *__hints__* to the compiler to be maximally pessimistic about what /// `black_box` could do. /// -/// [`std::convert::identity`]: https://doc.rust-lang.org/core/convert/fn.identity.html +/// [`std::convert::identity`]: crate::convert::identity /// /// Unlike [`std::convert::identity`], a Rust compiler is encouraged to assume that `black_box` can /// use `x` in any possible valid way that Rust code is allowed to without introducing undefined From c4923419c2570e2013e7b946f1a47001f8f9289a Mon Sep 17 00:00:00 2001 From: Denis Vasilik Date: Tue, 11 Aug 2020 23:54:51 +0200 Subject: [PATCH 2/3] Revert broken link --- library/core/src/hint.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/hint.rs b/library/core/src/hint.rs index 9ee50a9051013..6a14caebed017 100644 --- a/library/core/src/hint.rs +++ b/library/core/src/hint.rs @@ -99,7 +99,7 @@ pub fn spin_loop() { /// An identity function that *__hints__* to the compiler to be maximally pessimistic about what /// `black_box` could do. /// -/// [`std::convert::identity`]: crate::convert::identity +/// [`std::convert::identity`]: https://doc.rust-lang.org/core/convert/fn.identity.html /// /// Unlike [`std::convert::identity`], a Rust compiler is encouraged to assume that `black_box` can /// use `x` in any possible valid way that Rust code is allowed to without introducing undefined From 4c5896fbeb1a60d1e100c28fbe6cfe81ee2311fa Mon Sep 17 00:00:00 2001 From: Denis Vasilik Date: Wed, 12 Aug 2020 08:28:55 +0200 Subject: [PATCH 3/3] Remove intra-doc link as it resolves without reference link Co-authored-by: Joshua Nelson --- library/core/src/hint.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/library/core/src/hint.rs b/library/core/src/hint.rs index 6a14caebed017..461b4c79a1d1c 100644 --- a/library/core/src/hint.rs +++ b/library/core/src/hint.rs @@ -24,7 +24,6 @@ use crate::intrinsics; /// Otherwise, consider using the [`unreachable!`] macro, which does not allow /// optimizations but will panic when executed. /// -/// [`unreachable!`]: unreachable /// /// # Example ///