-
-
Notifications
You must be signed in to change notification settings - Fork 193
Closed
Description
This looks like #217 again. It seems ArchivedFoo enum variants don't have doc strings. Either they could get docstrings, or #[expect(missing_docs, reason = "generated code")]
or something.
//! Repro for an rkyv bug
#![deny(missing_docs)]
/// doc for enum
#[derive(rkyv::Archive)]
pub enum A {
/// doc for variant
Variant {
/// doc for field
field: (),
},
}
/// doc for enum
#[derive(rkyv::Archive)]
// Can't seem to special case allow it, this doesn't apply to enum variants?
#[rkyv(attr(expect(missing_docs)))]
pub enum B {
/// doc for variant
Variant {
/// doc for field
field: (),
},
}
/// doc for enum
#[derive(rkyv::Archive)]
#[rkyv(derive(Debug), attr(expect(missing_docs)))]
pub enum C {
/// doc for variant
// Can't special case allow it this way either.
#[rkyv(attr(expect(missing_docs)))]
Variant {
/// doc for field
field: (),
},
}
$ cargo clippy
Checking rkyv-missing-docs-issue v0.1.0 (/workspace/rkyv-missing-docs-issue)
error: missing documentation for a struct field
--> src/lib.rs:6:10
|
6 | #[derive(rkyv::Archive)]
| ^^^^^^^^^^^^^
|
note: the lint level is defined here
--> src/lib.rs:3:9
|
3 | #![deny(missing_docs)]
| ^^^^^^^^^^^^
= note: this error originates in the derive macro `rkyv::Archive` (in Nightly builds, run with -Z macro-backtrace for more info)
error: missing documentation for a struct field
--> src/lib.rs:6:10
|
6 | #[derive(rkyv::Archive)]
| ^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `rkyv::Archive` (in Nightly builds, run with -Z macro-backtrace for more info)
error: missing documentation for a struct field
--> src/lib.rs:16:10
|
16 | #[derive(rkyv::Archive)]
| ^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `rkyv::Archive` (in Nightly builds, run with -Z macro-backtrace for more info)
error: missing documentation for a struct field
--> src/lib.rs:28:10
|
28 | #[derive(rkyv::Archive)]
| ^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `rkyv::Archive` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `rkyv-missing-docs-issue` (lib) due to 4 previous errors
ThierryBergercxw620
Metadata
Metadata
Assignees
Labels
No labels