Skip to content

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

Merged
merged 4 commits into from
Sep 24, 2017

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Sep 19, 2017

See each commit for details.

r? @emilio

@bors-servo
Copy link

☔ The latest upstream changes (presumably #1003) made this pull request unmergeable. Please resolve the merge conflicts.

@fitzgen fitzgen force-pushed the some-little-deriving-cleanups branch from 8caaa4a to dd2a6a2 Compare September 19, 2017 23:09
@@ -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`");
Copy link
Contributor

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?

Copy link
Member Author

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.
Copy link
Contributor

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?

Copy link
Member Author

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.
@fitzgen fitzgen force-pushed the some-little-deriving-cleanups branch from dd2a6a2 to 337fbb4 Compare September 20, 2017 17:33
Copy link
Contributor

@emilio emilio left a 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!

@emilio
Copy link
Contributor

emilio commented Sep 24, 2017

@bors-servo r+

@bors-servo
Copy link

📌 Commit 337fbb4 has been approved by emilio

@bors-servo
Copy link

⌛ Testing commit 337fbb4 with merge c1aef63...

bors-servo pushed a commit that referenced this pull request Sep 24, 2017
Some little deriving cleanups

See each commit for details.

r? @emilio
@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: emilio
Pushing c1aef63 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants