-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for NonMin and NonMax types. #151435
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 RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-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.
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 RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(nonmin_nonmax_types)]This is a tracking issue for rust-lang/libs-team#721
NonMinandNonMaxare niche types, likeNonZero, that provide niches at T::MIN and T::MAX respectively.They are akin to
NonZeroin API, minus the individual aliases.Public API
As this API is implemented for many distinct types, I'm opting to only show the impls for
NonMin<isize>for demonstration purposes.The surface area for
NonMinandNonMaxare identical and their behavior only differs in niche location.Steps / History
(Remember to update the
S-tracking-*label when checking boxes.)Maintenance remarks
Unresolved Questions
overflowing_,wrapping_, andsaturating_?Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩