Skip to content
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

Use const generics #517

Closed
burdges opened this issue Feb 1, 2021 · 3 comments
Closed

Use const generics #517

burdges opened this issue Feb 1, 2021 · 3 comments

Comments

@burdges
Copy link

burdges commented Feb 1, 2021

We've min_const_generics approaching some stable release, which should suffice for replacing generic arrays everywhere.

Apologies if this came up elsewhere, not too plugged into these crates lately.

@newpavlov
Copy link
Member

As written here min_const_generics are not sufficient for our needs. We also probably will need for rust-lang/rust#76560 to be resolved and stabilized as well (hopefully in a different form from the approach which the feature uses now).

@burdges
Copy link
Author

burdges commented Feb 1, 2021

I'll close this in favor of #238 then

@burdges burdges closed this as completed Feb 1, 2021
@tarcieri
Copy link
Member

tarcieri commented Feb 1, 2021

We need min_const_generics + traits (i.e. using an associated constant as a const generic), so unfortunately the former alone is insufficient for our use cases.

There are a few places where we could consider const generics immediately. Namely in the der crate I use typenum (sans generic-array) to control the size of BigUint, but offhand that's really the only one I can think of where they're immediately applicable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants