-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Numeric type module constants should be moved into inherent impls #1099
Comments
The numeric type modules and their constants are marked as |
/cc @aturon |
Also see rust-lang/rust#23947 which suggests the addition of these associated consts. |
I tried to do this today, but encountered an ICE |
I think it's a minor enough breaking change to move the constants and deprecate the modules |
Spongebob Narrator voice: "Four years later." |
All of the methods provided on our numeric types are part of the inherent impls found in
core::num
. But the various constants provided for these types (e.g.usize::MAX
,i8::MIN
,f32::EPSILON
) are vended as part of modules named after the types. This seems like it should no longer be necessary now that we have associated constants, and it's confusing because clicking on the documentation for a primitive type (e.g.usize
) doesn't show these constants.The text was updated successfully, but these errors were encountered: