about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-04-15 03:54:15 +0000
committerbors <bors@rust-lang.org>2018-04-15 03:54:15 +0000
commitbc001fa07f1e44f88b59c74290a2dd916824d33c (patch)
treea55b1eb61a3bf7d791bbe40f2833015679abf36e /src/test/incremental/thinlto
parentd4d43e248340b6acaf02f4439713c160fd77a846 (diff)
parent105c5180941f4034fd0d576a1d4c1bb71dd8e077 (diff)
downloadrust-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/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions