-
Notifications
You must be signed in to change notification settings - Fork 744
#[derive]
is used on #[repr(packed)]
struct that does not derive Copy (E0133)
#2083
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
Comments
Is this a regression from 0.59 as well? |
@emilio |
Hitting this error as well (when generating bindings to kernel structs for eBPF), with the newest bindgen and rust nightly. |
Actually now it's an error, not a warning:
|
vadorovsky
added a commit
to vadorovsky/aya
that referenced
this issue
May 4, 2022
It's a workaround for the upstream bindgen issue: rust-lang/rust-bindgen#2083 tl;dr: Rust nightly complains about #[repr(packed)] structs deriving Debug without Copy. It needs to be fixed properly upstream, but for now we have to disable Debug derive here. Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 4, 2022
It's impossible to #[derive] from any other trair when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 4, 2022
It's impossible to #[derive] from any other trair when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 4, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 4, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 4, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 4, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 4, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 4, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 4, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 4, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 4, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 5, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
vadorovsky
added a commit
to vadorovsky/rust-bindgen
that referenced
this issue
May 5, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
emilio
pushed a commit
that referenced
this issue
May 7, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: #2083 Signed-off-by: Michal Rostecki <[email protected]>
fasterthanlime
pushed a commit
to fasterthanlime/aya
that referenced
this issue
May 20, 2022
It's a workaround for the upstream bindgen issue: rust-lang/rust-bindgen#2083 tl;dr: Rust nightly complains about #[repr(packed)] structs deriving Debug without Copy. It needs to be fixed properly upstream, but for now we have to disable Debug derive here. Signed-off-by: Michal Rostecki <[email protected]>
aatifsyed
pushed a commit
to aatifsyed/rust-bindgen
that referenced
this issue
Sep 22, 2022
It's impossible to #[derive] from any other trait when not deriving from Copy when using the newest Rust nightly. Any attempt to do that results in the following error: error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133) Fixes: rust-lang#2083 Signed-off-by: Michal Rostecki <[email protected]>
dmitris
added a commit
to dmitris/aya
that referenced
this issue
Feb 9, 2023
The comment says that `.derive_debug` was needed as a workaround for rust-lang/rust-bindgen#2083. This issue is now closed, and aya-tool compiles without derive_debug. Additionally, update bindgen dependency to 1.64.0. Signed-off-by: Dmitry Savintsev <[email protected]>
dmitris
added a commit
to dmitris/aya
that referenced
this issue
Feb 9, 2023
The comment says that `.derive_debug` was needed as a workaround for rust-lang/rust-bindgen#2083. This issue is now closed, and aya-tool compiles without derive_debug. Additionally, update bindgen dependency to 1.64. Signed-off-by: Dmitry Savintsev <[email protected]>
scottlamb
added a commit
to sportsball-ai/av-rs
that referenced
this issue
Jun 21, 2023
One version is easier to keep track of and should reduce build times. * replace ffmpeg-sys with ffmpeg-sys-next, which (among other things) uses bindgen 0.64. ffmpeg-sys was using a pre-0.60 version, so in some of our call sites, it hit build errors on Rust 1.70 due to rust-lang/rust-bindgen#2083 https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md#0600 * update cargo lock stuff to use the same version * remove stale comments about older versions
scottlamb
added a commit
to sportsball-ai/av-rs
that referenced
this issue
Jun 22, 2023
* use ffmpeg-sys-next, single version of bindgen One version is easier to keep track of and should reduce build times. * replace ffmpeg-sys with ffmpeg-sys-next, which (among other things) uses bindgen 0.64. ffmpeg-sys was using a pre-0.60 version, so in some of our call sites, it hit build errors on Rust 1.70 due to rust-lang/rust-bindgen#2083 https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md#0600 * update cargo lock stuff to use the same version * remove stale comments about older versions * fix xilinx build errors with bindgen 0.64
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you @emilio for fixing the last issue.
I have another issue here.
I am using rust 1.53 and bindgen 0.59.1
Input C/C++ Header
Actual Results
and compilation errors generated when compiling the bindings with rustc
Expected Results
Maybe no
Debug
derivative?The text was updated successfully, but these errors were encountered: