Skip to content

Commit 48d28e6

Browse files
Rollup merge of #154761 - Vastargazing:add-regression-tests-cmp-argument-order, r=jhpratt
coretests: add argument order regression tests for min_by/max_by/minmax_by PR rust-lang/rust#136307 introduced a regression in min_by, max_by, and minmax_by: the compare closure received arguments as (v2, v1) instead of (v1, v2), contrary to the documented contract. Although this was fixed in rust-lang/rust#139357, no regression tests were added. This PR adds regression tests for all three functions, verifying that compare always receives arguments in the documented order (v1, v2). As a bonus: first coretests coverage for minmax_by.
2 parents f09ae78 + 17d8cbf commit 48d28e6

0 file changed

File tree

    0 commit comments

    Comments
     (0)