don't generate extra `impl` for `Eq` assertions
`Eq` already has a method `assert_receiver_is_total_eq` that allows you to put asserts in. This PR makes it so we use that instead of generating a new trait and impl every time (which could be a lot).
This is also a cleanup because apparently `additional_impl` is only used by `Eq` (and arguably quite confusing as `additional_impl` is used to generate the `Eq` impl while the "main" `impl` was the extra impl) so we can remove that now.
generating a `struct __AssertEq` each time is still a little wasteful, but given that `derive-where` is a single crate (so no "normal" support crate to share types) it might be unavoidable.
合并状态:未合并 关闭于 2025-08-12 9 条评论