-
Notifications
You must be signed in to change notification settings - Fork 667
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
Use of ioctl!() in a crate with [warn(missing_docs)] #571
Comments
@agrover thanks for the report. I'm not too familiar with the |
The /// This is a binding to the blkgetsize64 ioctl
ioctl!(read blkgetsize64 with 0x12, 114; u64); If |
After some investigation, it turns out it's impossible to document functions generated by a macro in rust. See https://stackoverflow.com/questions/41361897/documenting-a-function-created-with-a-macro-in-rust. So I'm wondering if it'd be possible to transform ioctl! to support something like ioctl! {
/// Some doc-comments
readwrite some_ioctl(type: b'b', nr: 1, arg: some_arg)
} This syntax looks dreadful so if someone has a better idea, feel free to comment. But the basic idea is to allow the doc comments to be inside the macro invocation so we can use it to generate the function with it. |
661: Allow doc attributes in ioctl r=asomers fixes #571 . Note that this is a breaking change because it also changes ``` ioctl!(some_name with 12); ``` to ``` ioctl!(bad some_name with 12); ``` This is to work around a bug in the rust compiler whereby rules around matching idents are overly strict. See rust-lang/rust#24189 It doesn't break anything else though.
We'd like to enable
[warn(missing_docs)]
for our crate that uses nix, but when doing so we get this warning:I don't see a way in my nix-using crate to silence this (without disabling the warning, of course!) Thanks.
The text was updated successfully, but these errors were encountered: