-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking Issue for int_lowest_highest_one #145203
Copy link
Copy link
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.to-announceAnnounce this issue on triage meetingAnnounce this issue on triage meeting
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.to-announceAnnounce this issue on triage meetingAnnounce this issue on triage meeting
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(int_lowest_highest_one)]This is a tracking issue for the
lowest_oneandhighest_onemethods on primitive integer types and theirNonZerocounterparts.These methods provide an efficient way to find the index of the least significant (
lowest) and most significant (highest) set bit in an integer. They are common, low-level operations often supported directly by hardware (e.g.BSF/BSRon x86) and frequently used in systems programming, such as in OS kernels for managing bitmasks.Public API
Steps / History
first_set_bitandlast_set_bitfor integer types libs-team#631int_lowest_highest_onefor integer and NonZero types #145381Unresolved Questions
None.
Resolved Questions
lowest_oneandhighest_one, we want to maintain consistency with ACP: addleast_significant_oneandmost_significant_oneto integer types andNonZerotypes libs-team#467 (Tracking Issue forisolate_most_least_significant_one#136909).isolate_most_least_significant_onefunctions #144971, which seems to confirmlowest_oneandhighest_onefor this feature.Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩