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.
J
Jonathan Brouwer committed
6ee4118299263fdf2d881c8a4f70bc241dd237d4
Committed by GitHub <noreply@github.com>
on 4/7/2026, 3:26:31 PM