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

build error from Debug derives #4

Open
jonathanstrong opened this issue Nov 28, 2023 · 0 comments
Open

build error from Debug derives #4

jonathanstrong opened this issue Nov 28, 2023 · 0 comments

Comments

@jonathanstrong
Copy link

error[E0507]: cannot move out of `self.opts` which is behind a shared reference
     --> /data/src/rust-dpdk/target/release/build/dpdk-sys-e34f0fe463474727/out/dpdk.rs:62460:5
      |
62450 | #[derive(Debug, Default)]
      |          ----- in this derive macro expansion
...
62460 |     pub opts: __IncompleteArrayField<u32>,
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.opts` has type `__IncompleteArrayField<u32>`, which does not implement the `Copy` trait
      |
      = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.macs` which is behind a shared reference
     --> /data/src/rust-dpdk/target/release/build/dpdk-sys-e34f0fe463474727/out/dpdk.rs:93627:5
      |
93624 | #[derive(Debug, Default)]
      |          ----- in this derive macro expansion
...
93627 |     pub macs: __IncompleteArrayField<[__u8; 6usize]>,
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.macs` has type `__IncompleteArrayField<[u8; 6]>`, which does not implement the `Copy` trait
      |
      = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.page` which is behind a shared reference
      --> /data/src/rust-dpdk/target/release/build/dpdk-sys-e34f0fe463474727/out/dpdk.rs:107445:5
       |
107441 | #[derive(Debug, Default)]
       |          ----- in this derive macro expansion
...
107445 |     pub page: __IncompleteArrayField<u64>,
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.page` has type `__IncompleteArrayField<u64>`, which does not implement the `Copy` trait
       |
       = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.rxbuf` which is behind a shared reference
      --> /data/src/rust-dpdk/target/release/build/dpdk-sys-e34f0fe463474727/out/dpdk.rs:107686:5
       |
107680 | #[derive(Debug, Default)]
       |          ----- in this derive macro expansion
...
107686 |     pub rxbuf: __IncompleteArrayField<vmbus_rxbuf_desc>,
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.rxbuf` has type `__IncompleteArrayField<vmbus_rxbuf_desc>`, which does not implement the `Copy` trait
       |
       = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.gpa` which is behind a shared reference
      --> /data/src/rust-dpdk/target/release/build/dpdk-sys-e34f0fe463474727/out/dpdk.rs:107757:5
       |
107752 | #[derive(Debug, Default)]
       |          ----- in this derive macro expansion
...
107757 |     pub gpa: __IncompleteArrayField<vmbus_gpa>,
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.gpa` has type `__IncompleteArrayField<vmbus_gpa>`, which does not implement the `Copy` trait
       |
       = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.range` which is behind a shared reference
      --> /data/src/rust-dpdk/target/release/build/dpdk-sys-e34f0fe463474727/out/dpdk.rs:108203:5
       |
108196 | #[derive(Debug, Default)]
       |          ----- in this derive macro expansion
...
108203 |     pub range: vmbus_gpa_range,
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.range` has type `vmbus_gpa_range`, which does not implement the `Copy` trait
       |
       = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.gpa_page` which is behind a shared reference
      --> /data/src/rust-dpdk/target/release/build/dpdk-sys-e34f0fe463474727/out/dpdk.rs:108288:5
       |
108283 | #[derive(Debug, Default)]
       |          ----- in this derive macro expansion
...
108288 |     pub gpa_page: __IncompleteArrayField<u64>,
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.gpa_page` has type `__IncompleteArrayField<u64>`, which does not implement the `Copy` trait
       |
       = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0507`.
error: could not compile `dpdk-sys` (lib) due to 7 previous errors

possibly I am doing something wrong.

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

1 participant