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

Honor cbindgen:ignore directives for associated functions and constants #949

Merged
merged 3 commits into from May 7, 2024

Conversation

scovich
Copy link
Contributor

@scovich scovich commented May 2, 2024

Fix for #947

Add missing checks so that cbindgen honors cbindgen:ignore directives for associated functions and constants declared inside a struct impl.

@scovich scovich changed the title Expand ignored.rs test to cover associated items Honor cbindgen:ignore directives for associated functions and constants May 2, 2024
@scovich scovich marked this pull request as ready for review May 2, 2024 23:20
@scovich
Copy link
Contributor Author

scovich commented May 7, 2024

The clippy failures all seem to be in code this PR didn't touch, e.g.

error: assigning the result of `ToOwned::to_owned()` may be inefficient
   --> src/bindgen/ir/constant.rs:135:21
    |
135 |                     *export_name = self_ty.name().to_owned();
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `self_ty.name().clone_into(export_name)`

Is that expected?

@emilio
Copy link
Collaborator

emilio commented May 7, 2024

No, not your fault. I fixed those issues in master, should be good to go. Thanks for the fix!

@emilio emilio added this pull request to the merge queue May 7, 2024
Merged via the queue into mozilla:master with commit 10f32b0 May 7, 2024
2 checks passed
Comment on lines +103 to +105
if content.value().contains("XXX") {
panic!("*** XXX *** {}", content.value());
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops! This was leftover debugging code that probably shouldn't have merged...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix here: #951

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

Successfully merging this pull request may close these issues.

None yet

2 participants