rust/src/libsyntax_ext
bors bc001fa07f 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.
2018-04-15 03:54:15 +00:00
..
2018-04-14 17:25:35 +02:00
2018-04-06 11:50:49 +03:00
2018-03-02 10:48:52 +01:00
2018-04-06 11:48:19 +03:00
2018-04-06 11:50:49 +03:00
2018-04-06 11:48:19 +03:00
2018-04-06 11:48:19 +03:00
2018-04-06 11:48:19 +03:00
2018-04-14 17:25:35 +02:00