-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create NonZero
trait with primitive associated type
#95155
Conversation
This enables getting the primitive integer type for a nonzero type through a type alias.
/// | ||
/// let n: <NonZeroInt as NonZero>::Scalar = 1; | ||
/// ``` | ||
type Scalar; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to suggestions for a better name.
This comment has been minimized.
This comment has been minimized.
The job Click to see the possible cause of the failure (guessed by this bot)
|
Hey @nvzqz, can you add more detail to the top level comment explaining how you plan to use this API? I'm a little confused by the description you gave, is the NonZero type the one being aliased or are you creating an alias using the type exposed via this trait? Ideally I'd love to see a link to a branch on a crate where you intend to use this API testing out the API and demonstrating the intended usage. |
@rustbot label: -S-waiting-on-review +S-waiting-on-author |
This enables getting the primitive integer type for a nonzero type through a type alias.
r? @yaahc