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

Constant doc strings are not placed into the C header output #403

Closed
jamesmunns opened this issue Oct 17, 2019 · 3 comments · Fixed by #471
Closed

Constant doc strings are not placed into the C header output #403

jamesmunns opened this issue Oct 17, 2019 · 3 comments · Fixed by #471

Comments

@jamesmunns
Copy link

Given the following input:

/// A reasonable approximation of PI
pub const PI: f32 = 3.14159;

The following output is generated

#define PI 3.14159

I would instead expect the following to be generated:

/**
 * A reasonable approximation of PI
 */
#define PI 3.14159

So far I have successfully generated docs for other types, but constants do not seem to have their documentation brought along.

@emilio
Copy link
Collaborator

emilio commented Oct 17, 2019

It looks like this is just a plain oversight. In src/bindgen/ir/constant.rs, documentation is kept around but never actually used. Should be trivial to fix.

@arsing
Copy link
Contributor

arsing commented Feb 11, 2020

#471

@jamesmunns
Copy link
Author

Thank you @arsing and @emilio!

emilio pushed a commit that referenced this issue Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants