-
Notifications
You must be signed in to change notification settings - Fork 674
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
Allow doc attributes in ioctl #661
Conversation
src/sys/ioctl/mod.rs
Outdated
@@ -97,6 +97,16 @@ | |||
//! Most `ioctl`s have no or little documentation. You'll need to scrounge through | |||
//! the source to figure out what they do and how they should be used. | |||
//! | |||
//! How do I document the generated functions? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change this to "Documenting generated ioctl functions". I'd also like to request that you add a rationale why this was added (that generated ioctls are public and should have docs and that many crates error on missing documentation).
test/sys/test_ioctl.rs
Outdated
@@ -1,7 +1,7 @@ | |||
#![allow(dead_code)] | |||
|
|||
// Simple tests to ensure macro generated fns compile | |||
ioctl!(do_bad with 0x1234); | |||
ioctl!(bad do_bad with 0x1234); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need a test here that uses a comment with all of the various forms of the ioctl!
macro given that this is the functionality you're really adding here.
I'd also like to see this refactored into 2 commits. First fix the |
I did a bunch of minor cleanup in |
a3e5445
to
7a649cb
Compare
I rebased on top of master, and made some of the requested modifications. Is this good enough ? |
This looks good. Can you squash this into a single commit? Then we can merge it. |
7a649cb
to
4b8a661
Compare
Done. |
bors r+ susurrus |
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.
Build succeeded |
I missed this on the original PR, but this should also have added a CHANGELOG entry. @roblabla Could you add one to the |
fixes #571 . Note that this is a breaking change because it also changes
to
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.