Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rhdxmr opened this issue Jul 24, 2021 · 1 comment

Comments

@rhdxmr
Copy link

rhdxmr commented Jul 24, 2021

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]>

@emilio
Copy link
Contributor

emilio commented Jul 25, 2021

Hmm, thanks for filing, then this is likely a regression from #2070. CC @ian-p-cooke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants