Skip to content

Conversation

kornelski
Copy link
Contributor

@kornelski kornelski commented Oct 5, 2025

This reduces amount of unsafe code in partition(), while generating essentially the same code.

partition() and functions calling it can only run into out-of-bounds issues if the is_less function is buggy, so I've used cold panic_on_ord_violation() to replace various other panics/aborts. This slightly reduces code size, and gives a more relevant error message.

I've verified that the intrinsics::abort() was unnecessary: 13d7b54#r162627329

Related to #144327

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 5, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 5, 2025

r? @scottmcm

rustbot has assigned @scottmcm.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants