Skip to content

Error on deriving Default trait for __BindgenBitfieldUnit with too large array (redux) #2082

Closed

Description

Hello

I read this PR #1719 that prevents Default trait from deriving for structures that contain __BindgenBitfieldUnit with too large array.

But with rust 1.53 and bindgen 0.59 this problem raises again.

Input C/C++ Header

Quote from tests/headers/timex.h
If the comment // bindgen-flags: --rust-target 1.40 is removed, cargo test timex fails.

struct timex {
        int tai;

        int  :32; int  :32; int  :32; int  :32;
        int  :32; int  :32; int  :32; int  :32;
        int  :32; int  :32; int  :32;
};

Expected Results

No #[derive(Default)] for struct timex that contains __BindgenBitfieldUnit<[u8; 44usize]>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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