-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking Issue for isolate_most_least_significant_one #136909
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.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.
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.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(isolate_most_least_significant_one)]This is a tracking issue for functions that return an integer with only the most significant set bit or only the least significant set bit masked from the input integer.
The functions are implemented for unsigned, signed, and
NonZeroTinteger types.Public API
Steps / History
least_significant_oneandmost_significant_oneto integer types andNonZerotypes libs-team#467isolate_most_least_significant_onefor integer types #136910isolate_most_least_significant_onefunctions #144971Unresolved Questions
Function name lengthRESOLVED - #136909 (comment)
Functions have been renamed to
isolate_highest_one/isolate_lowest_oneThe initial function names are taken from the libs-api suggestions in the ACP, but they are quite verbose.
The names need to indicate that the integer being returned is the input with only the most/least significant set bit and not whether the most/least significant bit is 0 or 1. Hence,
isolateis suggested as a prefix to disambiguate the meaning.Possible names (non-exhaustive):
isolate_least_significant_one/isolate_most_significant_oneleast_sig_one/most_sig_onelowest_one/highest_onelowest_bit_set/highest_bit_setisolate_lowest_one/isolate_highest_onetrailing_one/leading_oneFootnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩