-
Notifications
You must be signed in to change notification settings - Fork 743
Some little deriving cleanups #1005
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
Some little deriving cleanups #1005
Conversation
☔ The latest upstream changes (presumably #1003) made this pull request unmergeable. Please resolve the merge conflicts. |
8caaa4a
to
dd2a6a2
Compare
@@ -115,7 +124,7 @@ impl<'ctx> MonotoneFramework for CannotDerivePartialEqOrPartialOrd<'ctx> { | |||
trace!("constrain: {:?}", id); | |||
|
|||
if self.cannot_derive_partialeq_or_partialord.contains(&id) { | |||
trace!(" already know it cannot derive PartialEq or PartialOrd"); | |||
trace!(" already know it cannot derive `PartialEq`/`PartialOrd`"); |
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.
Is it makes sense to put markdownique syntax in logs?
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.
I like to be consistent :)
/// | ||
/// * If T is Array type, `PartialEq` or partialord cannot be derived if the | ||
/// length of the array is larger than the limit or the type of data the array | ||
/// contains cannot derive `PartialEq` or partialord. |
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.
Is partialord
intentional or just missed?
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.
Just missed; thanks!
Changing "partialeq" and "partialord" into "`PartialEq`" and "`PartialOrd`" where it makes sense.
We were copying it around and it will be easier if it is defined in one place.
Again, this logic was getting copied all over the place, and it is nice to have a single canonical definition.
The whole "should be a no-op" thing isn't really true for all of the traits, especially in the face of black listing. Also further expounded on the differences between the trivial versions and normal versions.
dd2a6a2
to
337fbb4
Compare
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.
Looks great, sorry for not managing to get to this sooner.
Thanks a lot!
@bors-servo r+ |
📌 Commit 337fbb4 has been approved by |
Some little deriving cleanups See each commit for details. r? @emilio
☀️ Test successful - status-travis |
See each commit for details.
r? @emilio