diff options
| author | bors <bors@rust-lang.org> | 2021-02-09 08:47:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-02-09 08:47:38 +0000 |
| commit | c648bd55580a918d6f26f39bc167913a9da5ae3d (patch) | |
| tree | b365028cade2f02b40ab3af5230d39bc3dcb5500 /compiler/rustc_codegen_llvm/src | |
| parent | f4008fe94935d05ffb3a48fc5b7149070bb45550 (diff) | |
| parent | 62366ee6f14ed2798130aeedfbfe51e0d208d2c6 (diff) | |
| download | rust-c648bd55580a918d6f26f39bc167913a9da5ae3d.tar.gz rust-c648bd55580a918d6f26f39bc167913a9da5ae3d.zip | |
Auto merge of #81384 - tmiasko:partial-ord, r=petrochenkov
Fix derived PartialOrd operators The derived implementation of `partial_cmp` compares matching fields one by one, stopping the computation when the result of a comparison is not equal to `Some(Equal)`. On the other hand the derived implementation for `lt`, `le`, `gt` and `ge` continues the computation when the result of a field comparison is `None`, consequently those operators are not transitive and inconsistent with `partial_cmp`. Fix the inconsistency by using the default implementation that fall-backs to the `partial_cmp`. This also avoids creating very deeply nested closures that were quite costly to compile. Fixes #81373. Helps with #81278, #80118.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
