Skip to content

Rustdoc JSON produces dangling ID's when linking to foreign methods #106378

Open
@aDotInTheVoid

Description

@aDotInTheVoid
#![feature(intra_doc_pointers)]

//! [`read`][pointer::read]

Errors with

---- [rustdoc-json] src/test/rustdoc-json/intra-doc-links/pointer_method.rs stdout ----

error: jsondoclint failed!
status: exit status: 1
command: "/home/nixon/dev/rust/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/jsondoclint" "/home/nixon/dev/rust/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-json/intra-doc-links/pointer_method/pointer_method.json"
stdout: none
--- stderr -------------------------------
2:2017:1833 not in index or paths, but refered to at '$.index["0:0:1571"].links["pointer::read"]'
Error: Errors validating json /home/nixon/dev/rust/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-json/intra-doc-links/pointer_method/pointer_method.json
------------------------------------------

And produces

  "0:0:1571": {
      "crate_id": 0,
      "docs": "[`read`][pointer::read]",
      "id": "0:0:1571",
      "inner": {"is_crate": true, "is_stripped": false, "items": []},
      "kind": "module",
      "links": {"pointer::read": "2:2017:1833"},
      "name": "pointer_method"
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameA-rustdoc-jsonArea: Rustdoc JSON backendT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions