rustdoc-json: items may reference non-existent IDs.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
To reproduce, get rust-src from 2026-03-05, run cargo rustdoc -p core --output-format json -Z unstable-options -- --document-private-items.
In the generated json file, any reference to ParseFloatError has a non-existent ID.
For example, this use dec2flt::ParseFloatError statement in core/src/num/mod.rs:
{
"7473": {
"id": 7473,
"crate_id": 0,
"name": null,
"span": {
"filename": "core/src/num/mod.rs",
"begin": [
62,
1
],
"end": [
62,
34
]
},
"visibility": "public",
"docs": null,
"links": {},
"attrs": [
{
"other": "#[attr = CfgTrace([Not(NameValue { name: \"no_fp_fmt_parse\", value: None, span: core/src/num/mod.rs:61:11: 61:26 (#0) }, core/src/num/mod.rs:61:10: 61:27 (#0))])]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion { major: 1, minor: 0, patch: 0 })},\nfeature: \"rust1\"}}]"
}
],
"deprecation": null,
"inner": {
"use": {
"source": "dec2flt::ParseFloatError",
"name": "ParseFloatError",
"id": 634,
"is_glob": false
}
}
}
}
There is no Item or ItemSummary with Id 634.
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
Reproduce the issue with the listed rust-src revision and cargo rustdoc command, then inspect the generated JSON entry in core/src/num/mod.rs for ParseFloatError and ID 634. Trace how rustdoc JSON resolves referenced items and add a regression check ensuring every referenced ID has a corresponding Item or ItemSummary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100