Skip to content

Use const generics #517

Closed
Closed

Description

@burdges

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.

Activity

  1. newpavlov commented on Feb 1, 2021

    @newpavlov
    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).

  2. burdges commented on Feb 1, 2021

    @burdges
    Author

    I'll close this in favor of #238 then

  3. tarcieri commented on Feb 1, 2021

    @tarcieri
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions