Deriving Serialize/Deserialize on remote types causes `missing_docs` errors
Open
Nobody has claimed this yet.
derive
- Dominant language
- Rust
- Stars
- 10.8k
- Forks
- 944
- PR merge metrics
- No merged PRs in 30d
Description
Minimal example:
//! FOO
#![deny(missing_docs)]
use serde_derive::{Deserialize, Serialize};
/// X
pub struct X { f: u32 }
/// Remote X
#[derive(Deserialize, Serialize)]
#[serde(remote = "X")]
pub struct XDef { f: u32 }
Compiling playground v0.0.1 (/playground)
error: missing documentation for a method
--> src/lib.rs:11:20
|
11 | #[derive(Deserialize, Serialize)]
| ^
|
note: lint level defined here
--> src/lib.rs:3:9
|
3 | #![deny(missing_docs)]
| ^^^^^^^^^^^^
error: missing documentation for a method
--> src/lib.rs:11:31
|
11 | #[derive(Deserialize, Serialize)]
| ^
error: aborting due to 2 previous errors
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal Rust example and the serde_derive::{Deserialize, Serialize} remote-type derives shown in the issue. Inspect the generated methods associated with #[serde(remote = "X")] and verify the example no longer reports missing_docs errors when compiled with #![deny(missing_docs)].
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100