-
Notifications
You must be signed in to change notification settings - Fork 321
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
cbindgen emits constants in spite of no-export and/or ignore annotations #947
Comments
I think you need to use triple-dash, otherwise the comment isn't preserved by syn |
Triple slash that is, sorry. |
This still emits: pub struct Foo;
impl Foo {
/// cbindgen:ignore
/// cbindgen:no-export
pub const BAR: i64 = 42;
} This suppresses it (along with everything else inside the pub struct Foo;
/// cbindgen:ignore
/// cbindgen:no-export
impl Foo {
pub const BAR: i64 = 42;
} So it still seems like the annotations don't affect constants -- only the surrounding struct impl? |
Starting exploring in #949 It turns out |
I was able to find and add the missing |
Fixed by #949. |
For the following rust code:
cbindgen still emits the following header code:
I haven't found any combination of annotations that can suppress it, even tho the docs suggest it should work?
For ignore:
For no-export:
The text was updated successfully, but these errors were encountered: