Skip to content

Do not panic generating accessors for large bitfields #570

@fitzgen

Description

@fitzgen

This input

struct HasBigBitfield {
    __int128 x : 128;
};

results in this panic while generating bitfield accessor methods:

thread 'main' panicked at 'physical field containing bitfields should be sized 8, 4, 2, or 1 bytes'

But we should just skip the bitfield accessor method for such large bitfields instead of panicking. See Bitfield::codegen_fields inside src/codegen/mod.rs.

Happy to mentor someone on fixing this :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions