-
Notifications
You must be signed in to change notification settings - Fork 104
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
Consider promoting Field::{zero, one}
to associated constants
#87
Comments
I vaguely recall that at the time the traits were first written, there were limitations on how the associated constants could be either constructed or used? I don't recall the specifics, but the course of action depends on several things:
|
str4d
added a commit
that referenced
this issue
Oct 28, 2022
We now require that the type implementing `Field`, and its particular values for these constants, can be constructed in a const context. Once upon a time this might have been onerous, but it should now be a reasonable requirement given our MSRV of 1.56.0. Closes #87.
I've opened #94 so we can test the first bullet point. |
str4d
added a commit
that referenced
this issue
Nov 2, 2022
We now require that the type implementing `Field`, and its particular values for these constants, can be constructed in a const context. Once upon a time this might have been onerous, but it should now be a reasonable requirement given our MSRV of 1.56.0. Closes #87.
str4d
added a commit
that referenced
this issue
Nov 2, 2022
We now require that the type implementing `Field`, and its particular values for these constants, can be constructed in a const context. Once upon a time this might have been onerous, but it should now be a reasonable requirement given our MSRV of 1.56.0. Closes #87.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now
Field::zero()
andField::one()
are static methods of theField
trait.If they were instead associated constants, e.g.
Field::ZERO
/Field::ONE
, they can be used inconst
contexts such as defining other constants:The text was updated successfully, but these errors were encountered: