implement const_binary_search#159528
Merged
Merged
Conversation
Collaborator
|
r? @clarfonthey rustbot has assigned @clarfonthey. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Contributor
|
Yeah, I have wanted these for a while but forgot that we finally have const closures and can easily do this. Please create a tracking issue and update the code, and then I'm happy to merge. |
4 tasks
Lars-Schumann
force-pushed
the
const-binary-search
branch
from
July 18, 2026 17:32
a5448e7 to
2297b97
Compare
Contributor
Author
|
I opened the tracking issue and put it into the stability attributes. |
Contributor
|
@bors r+ rollup Thank you! |
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 18, 2026
…uwer Rollup of 6 pull requests Successful merges: - #159517 (stdarch subtree update) - #159010 (Simplify the unwind crate) - #156650 (Stop using prefix_tys) - #159152 (triagebot: cc miri on any special-casing of miri in the standard library) - #159522 (Apply `#[diagnostic::opaque]` to macros expanding to built-in syntax) - #159528 (implement `const_binary_search`)
rust-timer
added a commit
that referenced
this pull request
Jul 19, 2026
Rollup merge of #159528 - Lars-Schumann:const-binary-search, r=clarfonthey implement `const_binary_search` tracking issue: #159532 This makes unstably `const` the following public api: `core::slice::binary_search` `core::slice::binary_search_by` `core::slice::binary_search_by_key` `core::slice::partition_point` Happy to make a tracking issue if these are acceptable.
pull Bot
pushed a commit
to LeeeeeeM/miri
that referenced
this pull request
Jul 19, 2026
…uwer Rollup of 6 pull requests Successful merges: - rust-lang/rust#159517 (stdarch subtree update) - rust-lang/rust#159010 (Simplify the unwind crate) - rust-lang/rust#156650 (Stop using prefix_tys) - rust-lang/rust#159152 (triagebot: cc miri on any special-casing of miri in the standard library) - rust-lang/rust#159522 (Apply `#[diagnostic::opaque]` to macros expanding to built-in syntax) - rust-lang/rust#159528 (implement `const_binary_search`)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tracking issue: #159532
This makes unstably
constthe following public api:core::slice::binary_searchcore::slice::binary_search_bycore::slice::binary_search_by_keycore::slice::partition_pointHappy to make a tracking issue if these are acceptable.