@@ -200,6 +200,14 @@ pub trait PartialEq<Rhs: ?Sized = Self> {
200200 fn ne ( & self , other : & Rhs ) -> bool { !self . eq ( other) }
201201}
202202
203+ /// Derive macro generating an impl of the trait `PartialEq`.
204+ #[ cfg( not( bootstrap) ) ]
205+ #[ rustc_builtin_macro]
206+ #[ rustc_macro_transparency = "semitransparent" ]
207+ #[ stable( feature = "builtin_macro_prelude" , since = "1.38.0" ) ]
208+ #[ allow_internal_unstable( core_intrinsics) ]
209+ pub macro PartialEq ( $item: item) { /* compiler built-in */ }
210+
203211/// Trait for equality comparisons which are [equivalence relations](
204212/// https://en.wikipedia.org/wiki/Equivalence_relation).
205213///
@@ -256,6 +264,14 @@ pub trait Eq: PartialEq<Self> {
256264 fn assert_receiver_is_total_eq ( & self ) { }
257265}
258266
267+ /// Derive macro generating an impl of the trait `Eq`.
268+ #[ cfg( not( bootstrap) ) ]
269+ #[ rustc_builtin_macro]
270+ #[ rustc_macro_transparency = "semitransparent" ]
271+ #[ stable( feature = "builtin_macro_prelude" , since = "1.38.0" ) ]
272+ #[ allow_internal_unstable( core_intrinsics, derive_eq) ]
273+ pub macro Eq ( $item: item) { /* compiler built-in */ }
274+
259275// FIXME: this struct is used solely by #[derive] to
260276// assert that every component of a type implements Eq.
261277//
@@ -600,6 +616,14 @@ pub trait Ord: Eq + PartialOrd<Self> {
600616 }
601617}
602618
619+ /// Derive macro generating an impl of the trait `Ord`.
620+ #[ cfg( not( bootstrap) ) ]
621+ #[ rustc_builtin_macro]
622+ #[ rustc_macro_transparency = "semitransparent" ]
623+ #[ stable( feature = "builtin_macro_prelude" , since = "1.38.0" ) ]
624+ #[ allow_internal_unstable( core_intrinsics) ]
625+ pub macro Ord ( $item: item) { /* compiler built-in */ }
626+
603627#[ stable( feature = "rust1" , since = "1.0.0" ) ]
604628impl Eq for Ordering { }
605629
@@ -842,6 +866,14 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
842866 }
843867}
844868
869+ /// Derive macro generating an impl of the trait `PartialOrd`.
870+ #[ cfg( not( bootstrap) ) ]
871+ #[ rustc_builtin_macro]
872+ #[ rustc_macro_transparency = "semitransparent" ]
873+ #[ stable( feature = "builtin_macro_prelude" , since = "1.38.0" ) ]
874+ #[ allow_internal_unstable( core_intrinsics) ]
875+ pub macro PartialOrd ( $item: item) { /* compiler built-in */ }
876+
845877/// Compares and returns the minimum of two values.
846878///
847879/// Returns the first argument if the comparison determines them to be equal.
0 commit comments