diff options
| author | bors <bors@rust-lang.org> | 2018-04-15 03:54:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-04-15 03:54:15 +0000 |
| commit | bc001fa07f1e44f88b59c74290a2dd916824d33c (patch) | |
| tree | a55b1eb61a3bf7d791bbe40f2833015679abf36e /src/etc | |
| parent | d4d43e248340b6acaf02f4439713c160fd77a846 (diff) | |
| parent | 105c5180941f4034fd0d576a1d4c1bb71dd8e077 (diff) | |
| download | rust-bc001fa07f1e44f88b59c74290a2dd916824d33c.tar.gz rust-bc001fa07f1e44f88b59c74290a2dd916824d33c.zip | |
Auto merge of #49881 - varkor:partialord-opt, r=Manishearth
Fix derive(PartialOrd) and optimise final field operation ```rust // Before (`lt` on 2-field struct) self.f1 < other.f1 || (!(other.f1 < self.f1) && (self.f2 < other.f2 || (!(other.f2 < self.f2) && (false) )) ) // After self.f1 < other.f1 || (!(other.f1 < self.f1) && self.f2 < other.f2 ) // Before (`le` on 2-field struct) self.f1 < other.f1 || (!(other.f1 < self.f1) && (self.f2 < other.f2 || (!(other.f2 < self.f2) && (true) )) ) // After self.f1 < other.f1 || (self.f1 == other.f1 && self.f2 <= other.f2 ) ``` (The big diff is mainly because of a past faulty rustfmt application that I corrected 😒) Fixes #49650 and fixes #49505.
Diffstat (limited to 'src/etc')
| -rwxr-xr-x | src/etc/generate-deriving-span-tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/generate-deriving-span-tests.py b/src/etc/generate-deriving-span-tests.py index 5b106275ac9..edb9389c00c 100755 --- a/src/etc/generate-deriving-span-tests.py +++ b/src/etc/generate-deriving-span-tests.py @@ -122,7 +122,7 @@ traits = { for (trait, supers, errs) in [('Clone', [], 1), ('PartialEq', [], 2), - ('PartialOrd', ['PartialEq'], 3), + ('PartialOrd', ['PartialEq'], 5), ('Eq', ['PartialEq'], 1), ('Ord', ['Eq', 'PartialOrd', 'PartialEq'], 1), ('Debug', [], 1), |
