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

Deriving BinRead with named arguments fails to compile with #![deny(missing_docs)] #124

Closed
mvforell opened this issue May 29, 2022 · 0 comments
Assignees

Comments

@mvforell
Copy link

Trying to compile code that looks something like this:

#![deny(missing_docs)]

#[derive(BinRead)]
#[br(import { foo: u32 })]
struct Foo {
    bar: u8,
}

results in this error:

error: missing documentation for a struct
   --> src/messages.rs:139:24
    |
139 | #[derive(Clone, Debug, BinRead, BinWrite)]
    |                        ^^^^^^^

I think this is because the generated code for the argument struct (FooBinReadArgs) has no documentation.

Switching from named arguments to tuple-style arguments fixes the error.

@mvforell mvforell changed the title Deriving BinRead with arguments fails to compile with #![deny(missing_docs)] Deriving BinRead with named arguments fails to compile with #![deny(missing_docs)] May 29, 2022
@csnover csnover self-assigned this Aug 23, 2022
csnover added a commit to csnover/binrw that referenced this issue Aug 23, 2022
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

No branches or pull requests

2 participants