Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
aDotInTheVoid opened this issue Aug 27, 2022 · 0 comments · Fixed by #101106
Closed

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

aDotInTheVoid opened this issue Aug 27, 2022 · 0 comments · Fixed by #101106
Assignees
Labels
A-rustdoc-json Area: Rustdoc JSON backend T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@aDotInTheVoid
Copy link
Member

aDotInTheVoid commented Aug 27, 2022

#![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

@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 27, 2022
aDotInTheVoid added a commit to aDotInTheVoid/rust that referenced this issue Aug 28, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Aug 28, 2022
…GuillaumeGomez

Rustdoc-Json: Retain Stripped Modules when they are imported, not when they have items

Fixes rust-lang#101103
Fixes rust-lang#100973

r? `@GuillaumeGomez`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Aug 28, 2022
…GuillaumeGomez

Rustdoc-Json: Retain Stripped Modules when they are imported, not when they have items

Fixes rust-lang#101103
Fixes rust-lang#100973

r? ``@GuillaumeGomez``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Aug 29, 2022
…GuillaumeGomez

Rustdoc-Json: Retain Stripped Modules when they are imported, not when they have items

Fixes rust-lang#101103
Fixes rust-lang#100973

r? `@GuillaumeGomez`
@bors bors closed this as completed in 8050c19 Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
2 participants