-
Couldn't load subscription status.
- Fork 13.9k
fix a comment about assert_receiver_is_total_eq #115888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
r? @m-ou-se (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
@bors r+ rollup |
|
This leads me to wonder how true "doing this assertion without using a method on this trait is nearly impossible" still is, or if we should be generating something like: // before
#[automatically_derived]
impl<$generics> ::core::cmp::Eq for $Thing {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<$FieldType>;
}
}
// after
#[automatically_derived]
impl<$generics> ::core::cmp::Eq for $Thing {}
const _: () = {
#[coverage(off)]
fn assert_fields_are_total_eq<$generics>(_: &$Thing) {
let _: ::core::cmp::AssertParamIsEq<$FieldType>;
}
}; |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#112959 (Change the wording in `std::fmt::Write::write_str`) - rust-lang#115535 (format doc-comment code examples in std::process) - rust-lang#115888 (fix a comment about assert_receiver_is_total_eq) - rust-lang#116211 (more clippy complextity fixes ) - rust-lang#116213 (Document -Zlink-native-libraries) - rust-lang#116215 (Tweak wording of missing angle backets in qualified path) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#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`.
"a type implements #[deriving]" doesn't make any sense, so I assume they meant "implement
Eq"? Also the attribute is calledderive.