Rollup merge of #115888 - RalfJung:assert_receiver_is_total_eq, r=dtolnay

fix a comment about assert_receiver_is_total_eq

"a type implements #[deriving]" doesn't make any sense, so I assume they meant "implement `Eq`"? Also the attribute is called `derive`.
This commit is contained in:
Matthias Krüger 2023-09-28 09:14:06 +02:00 committed by GitHub
commit 698448c0cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -291,9 +291,9 @@ fn ne(&self, other: &Rhs) -> bool {
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_diagnostic_item = "Eq"]
pub trait Eq: PartialEq<Self> {
// this method is used solely by #[deriving] to assert
// that every component of a type implements #[deriving]
// itself, the current deriving infrastructure means doing this
// this method is used solely by #[derive(Eq)] to assert
// that every component of a type implements `Eq`
// itself. The current deriving infrastructure means doing this
// assertion without using a method on this trait is nearly
// impossible.
//