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

aya-gen: Disable Debug derive for BTF types #250

Merged
merged 1 commit into from May 4, 2022

Conversation

vadorovsky
Copy link
Member

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 vadorovsky@gmail.com

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 <vadorovsky@gmail.com>
Copy link
Member

@dave-tucker dave-tucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Tested this and it looks like it does what it's supposed to do:

 #[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Copy, Clone)]

@dave-tucker dave-tucker merged commit e2ebd85 into aya-rs:main May 4, 2022
@vadorovsky vadorovsky deleted the aya-gen-disable-debug branch May 4, 2022 16:29
@dave-tucker dave-tucker added fix A PR that is a small change or fixes a bug aya-bpf This is about aya-bpf (kernel) aya This is about aya (userspace) labels May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aya This is about aya (userspace) aya-bpf This is about aya-bpf (kernel) fix A PR that is a small change or fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants