Skip to content

Rustdoc-Json: Reexporting item in module adds that module to index #101103

Closed
@aDotInTheVoid

Description

@aDotInTheVoid
#![feature(no_core)]
#![no_core]

mod m1 {
    pub fn x(){}
}

pub use m1::x;

Produces (abbridged)

{
  "crate_version": null,
  "external_crates": {},
  "format_version": 18,
  "includes_private": false,
  "index": {
    "0:0:1568": {
      "crate_id": 0,
      "id": "0:0:1568",
      "inner": {"is_crate": true, "is_stripped": false, "items": ["0:3"]},
      "kind": "module",
      "name": "bug"
    },
    "0:1:1566": {
      "crate_id": 0,
      "id": "0:1:1566",
      "inner": {"is_crate": false, "is_stripped": true, "items": ["0:2:1567"]},
      "kind": "module",
      "name": "m1"
    },
    "0:2:1567": {
      "crate_id": 0,
      "id": "0:2:1567",
      "inner": {"decl": {"c_variadic": false, "inputs": [], "output": null}},
      "kind": "function",
      "name": "x"
    },
    "0:3": {
      "crate_id": 0,
      "id": "0:3",
      "inner": {"glob": false, "id": "0:2:1567", "name": "x", "source": "m1::x"},
      "kind": "import",
      "name": null
    }
  },
  "root": "0:0:1568"
}

But theirs no need for 0:1:1566 to be in the index: 0:1:1566

@rustbot modify labels: +A-rustdoc-json +T-rustdoc

@rustbot claim

Metadata

Metadata

Assignees

Labels

A-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