Skip to content

Copy trait is derived when a struct contains __IncompleteArrayField #458

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

Closed
leeopop opened this issue Jan 29, 2017 · 2 comments
Closed

Copy trait is derived when a struct contains __IncompleteArrayField #458

leeopop opened this issue Jan 29, 2017 · 2 comments

Comments

@leeopop
Copy link

leeopop commented Jan 29, 2017

I have this error with generated code.

6948 |     pub field: __IncompleteArrayField<rte_acl_field>,
     |     ------------------------------------------------ this field does not implement `Copy`

While the generated rte_acl_field is

#[repr(C)]
#[derive(Debug, Copy)]
pub struct rte_acl_field {
    pub value: rte_acl_field_types,
    pub mask_range: rte_acl_field_types,
}

I think a00e8b0
affects the result.

I check that 7d995d7 did not cause problems.
You may refer https://github.com/ANLAB-KAIST/rust-dpdk this repository to reproduce my result or put this usage scenario into test cases.

@emilio
Copy link
Contributor

emilio commented Jan 29, 2017

I added a commit fixing this in #457, thanks for reporting it :)

@fitzgen
Copy link
Member

fitzgen commented Feb 1, 2017

Fixed in #457. Thanks!

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

3 participants