Skip to content

Commit

Permalink
Rollup merge of #109947 - clubby789:cmp-macro-crosslink, r=JohnTitor
Browse files Browse the repository at this point in the history
Add links from `core::cmp` derives to their traits

Fixes #109946
Adds intra-doc links from the `core::cmp` derives to their respective traits, and a link to their derive behaviour

`@rustbot` label +A-docs
  • Loading branch information
matthiaskrgr committed Apr 14, 2023
2 parents 13790be + 8d4cccd commit 4b8351f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions library/core/src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ pub trait PartialEq<Rhs: ?Sized = Self> {
}
}

/// Derive macro generating an impl of the trait `PartialEq`.
/// Derive macro generating an impl of the trait [`PartialEq`].
/// The behavior of this macro is described in detail [here](PartialEq#derivable).
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, structural_match)]
Expand Down Expand Up @@ -297,7 +298,7 @@ pub trait Eq: PartialEq<Self> {
fn assert_receiver_is_total_eq(&self) {}
}

/// Derive macro generating an impl of the trait `Eq`.
/// Derive macro generating an impl of the trait [`Eq`].
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, derive_eq, structural_match, no_coverage)]
Expand Down Expand Up @@ -859,7 +860,8 @@ pub trait Ord: Eq + PartialOrd<Self> {
}
}

/// Derive macro generating an impl of the trait `Ord`.
/// Derive macro generating an impl of the trait [`Ord`].
/// The behavior of this macro is described in detail [here](Ord#derivable).
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
Expand Down Expand Up @@ -1138,7 +1140,8 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
}
}

/// Derive macro generating an impl of the trait `PartialOrd`.
/// Derive macro generating an impl of the trait [`PartialOrd`].
/// The behavior of this macro is described in detail [here](PartialOrd#derivable).
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
Expand Down

0 comments on commit 4b8351f

Please sign in to comment.