Skip to content

Commit 4b8351f

Browse files
authored
Rollup merge of #109947 - clubby789:cmp-macro-crosslink, r=JohnTitor
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
2 parents 13790be + 8d4cccd commit 4b8351f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

library/core/src/cmp.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ pub trait PartialEq<Rhs: ?Sized = Self> {
231231
}
232232
}
233233

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

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

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

1141-
/// Derive macro generating an impl of the trait `PartialOrd`.
1143+
/// Derive macro generating an impl of the trait [`PartialOrd`].
1144+
/// The behavior of this macro is described in detail [here](PartialOrd#derivable).
11421145
#[rustc_builtin_macro]
11431146
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
11441147
#[allow_internal_unstable(core_intrinsics)]

0 commit comments

Comments
 (0)