modular-bitfield icon indicating copy to clipboard operation
modular-bitfield copied to clipboard

Feature request: Array support

Open VisualEhrmanntraut opened this issue 2 years ago • 3 comments

Currently, the following is not supported:

#[bitfield]
pub struct Testing {
    #[skip] __: [bool; 512],
}

It will complain with the error below:

error[E0277]: the trait bound `[bool; 512]: modular_bitfield::Specifier` is not satisfied
   --> src/test.rs:41:5
    |
41  |     #[skip] __: [bool; 512],
    |     ^^^^^^^^^^^^^^^^^^^^^^^ the trait `modular_bitfield::Specifier` is not implemented for `[bool; 512]`
    |
note: required by `modular_bitfield::Specifier::BITS`
   --> /Users/visual/.cargo/registry/src/github.com-1ecc6299db9ec823/modular-bitfield-0.11.2/src/lib.rs:455:5
    |
455 |     const BITS: usize;
    |     ^^^^^^^^^^^^^^^^^^

VisualEhrmanntraut avatar Sep 29 '21 17:09 VisualEhrmanntraut