Exclude enum's repr field from missing_docs

This is a synthetic field that isn't visible in the FFI module's source
code.
This commit is contained in:
David Tolnay 2020-12-30 15:06:00 -08:00
parent cc5b02e4eb
commit 232a0e3630
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 1 additions and 8 deletions

View File

@ -296,6 +296,7 @@ fn expand_enum(enm: &Enum) -> TokenStream {
#derives
#[repr(transparent)]
pub struct #ident {
#[allow(missing_docs)]
pub repr: #repr,
}

View File

@ -31,14 +31,6 @@ error: missing documentation for a struct
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: missing documentation for a struct field
--> $DIR/deny_missing_docs.rs:9:1
|
9 | #[cxx::bridge]
| ^^^^^^^^^^^^^^
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: missing documentation for an associated constant
--> $DIR/deny_missing_docs.rs:9:1
|