Skip to content

Commit

Permalink
Auto merge of #96521 - petrochenkov:docrules, r=notriddle,GuillaumeGomez
Browse files Browse the repository at this point in the history
rustdoc: Resolve doc links referring to `macro_rules` items

cc rust-lang/rust#81633

UPD: the fallback to considering *all* `macro_rules` in the crate for unresolved names is not removed in this PR, it will be removed separately and will be run through crater.
  • Loading branch information
bors committed May 1, 2022
2 parents 1f43f5f + d23b1c1 commit 9c70d52
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down
4 changes: 4 additions & 0 deletions std/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down Expand Up @@ -77,6 +79,7 @@ macro_rules! print {
/// [`eprintln!`] instead to print error and progress messages.
///
/// [`std::fmt`]: crate::fmt
/// [`eprintln!`]: crate::eprintln
///
/// # Panics
///
Expand Down Expand Up @@ -146,6 +149,7 @@ macro_rules! eprint {
///
/// [`io::stderr`]: crate::io::stderr
/// [`io::stdout`]: crate::io::stdout
/// [`println!`]: crate::println
///
/// # Panics
///
Expand Down
2 changes: 2 additions & 0 deletions std/src/thread/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`]
Expand Down
1 change: 1 addition & 0 deletions std/src/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 9c70d52

Please sign in to comment.