-
Notifications
You must be signed in to change notification settings - Fork 135
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
Make FloatConst members be const #213
Comments
How would that be used? Last I checked, you couldn't have generic constraints (like |
Unfortunately,
Both of these could be solved by moving the consts in The only disadvantage I see to making the members of Edit: Long-term, it seems likely that Rust will support generic parameters on |
Ah, yes, I forgot about this situation.
I don't think |
Right. I'd think that in generic code with a Fwiw, I'd also suggest converting the "constant" methods of |
Fwiw, I found the RFC which moved most numeric constants to be associated constants on the numeric types: RFC 2700. The Alternatives section says the following regarding
So, with another RFC, maybe we could achieve consensus to move everything from |
The libs-team decision on that is here: rust-lang/rust#68490 (comment)
|
I'd like to propose the following breaking change (to be added to #47): make the members of
FloatConst
be either associated consts (my preference) orconst fn
s, so that they can be used in constants.The text was updated successfully, but these errors were encountered: