Skip to content

Tracking issue for additional array size support: error[E0277]: the trait bound UInt<...>: ArraySize is not satisfied #66

Open
@tarcieri

Description

@tarcieri

hybrid-array relies on impls of ArraySize on individual typenum::Unsigned types, e.g. U1, U2, U3, which is a deliberate tradeoff versus generic-array which is able to support any array size.

These ArraySize impls are the linkage between typenum types and core arrays, which provide the underlying storage used by hybrid-array, and with it const generic linkage and significantly less unsafe code.

Unfortunately, you will encounter the rustc error message in the issue title if you attempt to use an unsupported array size.

Per #57, we are attempting to handle such cases as one-off requests for sizes which can be granted on a case-by-case basis, and gating them under the extra-sizes. It's unclear how well this will work in practice, but we are attempting it for now.

The main reason to constrain the number of supported sizes is a compile time cost as we add more impls of ArraySize/AssocArraySize. Compile times are not currently too significant but get worse as we add support for more array sizes.

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