The Eq::assert_receiver_is_total_eq method is purely meant as an implementation detail by #[derive(Eq)] to add checks that all fields of the type the derive is applied to also implement Eq.
The method is already #[doc(hidden)] and has a comment saying // This should never be implemented by hand..
Unfortunately, it has been stable since 1.0 and there are some cases on GitHub (https://github.com/search?q=assert_receiver_is_total_eq&type=code) where people have implemented this method manually, sometimes even with actual code in the method body.
To prevent further confusion from this, I propose deprecating the method and perhaps destabilizing it in the future, if the breakage is low enough.
(It should also be possible to move the compiler-generated checks in assert_receiver_is_total_eq into a const _: () = { ... }, removing any need for this method entirely.)
The
Eq::assert_receiver_is_total_eqmethod is purely meant as an implementation detail by#[derive(Eq)]to add checks that all fields of the type the derive is applied to also implementEq.The method is already
#[doc(hidden)]and has a comment saying// This should never be implemented by hand..Unfortunately, it has been stable since 1.0 and there are some cases on GitHub (https://github.com/search?q=assert_receiver_is_total_eq&type=code) where people have implemented this method manually, sometimes even with actual code in the method body.
To prevent further confusion from this, I propose deprecating the method and perhaps destabilizing it in the future, if the breakage is low enough.
(It should also be possible to move the compiler-generated checks in
assert_receiver_is_total_eqinto aconst _: () = { ... }, removing any need for this method entirely.)