From 6083db7c4ef72ee5435e8157ba5b3f5397da1080 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sun, 1 May 2022 00:02:34 +0300 Subject: [PATCH] Fix some links in the standard library --- library/core/src/macros/mod.rs | 2 ++ library/std/src/macros.rs | 4 ++++ library/std/src/thread/local.rs | 2 ++ library/std/src/thread/mod.rs | 1 + 4 files changed, 9 insertions(+) diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs index 83f33ca007a..d00056f0c32 100644 --- a/library/core/src/macros/mod.rs +++ b/library/core/src/macros/mod.rs @@ -640,6 +640,8 @@ macro_rules! unreachable { /// /// Like `panic!`, this macro has a second form for displaying custom values. /// +/// [`todo!`]: crate::todo +/// /// # Examples /// /// Say we have a trait `Foo`: diff --git a/library/std/src/macros.rs b/library/std/src/macros.rs index c597fb5df45..153b6843cd9 100644 --- a/library/std/src/macros.rs +++ b/library/std/src/macros.rs @@ -31,6 +31,8 @@ macro_rules! panic { /// [`eprint!`] instead to print error and progress messages. /// /// [flush]: crate::io::Write::flush +/// [`println!`]: crate::println +/// [`eprint!`]: crate::eprint /// /// # Panics /// @@ -77,6 +79,7 @@ macro_rules! print { /// [`eprintln!`] instead to print error and progress messages. /// /// [`std::fmt`]: crate::fmt +/// [`eprintln!`]: crate::eprintln /// /// # Panics /// @@ -146,6 +149,7 @@ macro_rules! eprint { /// /// [`io::stderr`]: crate::io::stderr /// [`io::stdout`]: crate::io::stdout +/// [`println!`]: crate::println /// /// # Panics /// diff --git a/library/std/src/thread/local.rs b/library/std/src/thread/local.rs index 4ab8fb2e905..f4750cdf764 100644 --- a/library/std/src/thread/local.rs +++ b/library/std/src/thread/local.rs @@ -21,6 +21,8 @@ use crate::fmt; /// The [`with`] method yields a reference to the contained value which cannot be /// sent across threads or escape the given closure. /// +/// [`thread_local!`]: crate::thread_local +/// /// # Initialization and Destruction /// /// Initialization is dynamically performed on the first call to [`with`] diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index 99da5f7a87e..b4b1037a3cd 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -146,6 +146,7 @@ //! [`Cell`]: crate::cell::Cell //! [`RefCell`]: crate::cell::RefCell //! [`with`]: LocalKey::with +//! [`thread_local!`]: crate::thread_local #![stable(feature = "rust1", since = "1.0.0")] #![deny(unsafe_op_in_unsafe_fn)]