-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
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.
Description
Feature gate: #![feature(nonzero_trait)]
This is a tracking issue for adding a NonZero
trait to core::num
, which includes an associated scalar type and a safety requirement.
Public API
// core::num
pub unsafe trait NonZero: Sealed {
type Scalar;
}
unsafe impl NonZero for NonZero{U,I}{8,16,32,64,128,size} {
type Scalar = {u,i}{8,16,32,64,128,size};
}
Steps / History
- Implementation: Create
NonZero
trait with primitive associated type #95155 - Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- Should the associated type be named
Scalar
or something else, such asPrimitive
?
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.