- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Open
Labels
A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
With the following code:
#[doc(hidden)]
pub mod __secrets {
    pub struct Foo;
}
pub use __secrets::Foo;It has a dangling ID:
---- [rustdoc-json] tests/rustdoc-json/reexport/pub_use_from_doc_hidden_mod.rs stdout ----
error: jsondoclint failed!
status: exit status: 1
command: "/home/gh-aDotInTheVoid/rust2/build/aarch64-unknown-linux-gnu/stage0-tools-bin/jsondoclint" "/home/gh-aDotInTheVoid/rust2/build/aarch64-unknown-linux-gnu/test/rustdoc-json/reexport/pub_use_from_doc_hidden_mod/pub_use_from_doc_hidden_mod.json"
stdout: none
--- stderr -------------------------------
0:4:1750 not in index or paths, but referred to at '$.index["0:6-0:4:1750"].inner.import.id'
Error: Errors validating json /home/gh-aDotInTheVoid/rust2/build/aarch64-unknown-linux-gnu/test/rustdoc-json/reexport/pub_use_from_doc_hidden_mod/pub_use_from_doc_hidden_mod.json
------------------------------------------
As it has the following json (redacted)
  "index": {
    "0:0:1751": {
      "inner": {"module": {"is_crate": true, "is_stripped": false, "items": ["0:6-0:4:1750"]}},
      "name": "pub_use_from_doc_hidden_mod"
    },
    "0:6-0:4:1750": {
      "inner": {"import": {"glob": false, "id": "0:4:1750", "name": "Foo", "source": "__secrets::Foo"}},
      "name": null
    },In HTML, Foo is inlined to the crate root.
Version: 28acba3
obi1kenobi
Metadata
Metadata
Assignees
Labels
A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.