-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
ICE on rustdoc-json with re-export due to ID collision #80664
Copy link
Copy link
Closed
Labels
A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-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.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.
Metadata
Metadata
Assignees
Labels
A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-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.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
Meta
Invoke with
rustdoc broke.rs --output-format jsonrustdoc --version --verbose:Error output
Backtrace
Working variants
json
{ "root": "0:0", "crate_version": null, "includes_private": false, "index": { "0:0": { "id": "0:0", "inner": { "is_crate": true, "items": [] }, "kind": "module", "name": "work1", "visibility": "public" } }, "paths": { "0:0": { "crate_id": 0, "path": ["work1"], "kind": "module" } }, "external_crates": {}, "format_version": 1 }json
{ "root": "0:0", "crate_version": null, "includes_private": false, "index": { "0:0": { "id": "0:0", "inner": { "is_crate": true, "items": ["0:4"] }, "kind": "module", "name": "work2", "visibility": "public" }, "0:4": { "id": "0:4", "inner": { "struct_type": "unit", "generics": { "params": [], "where_predicates": [] }, "fields_stripped": false, "fields": [], "impls": ["0:9", "0:10", "0:11", "0:13", "0:14"] }, "kind": "struct", "name": "Public", "visibility": "public" } }, "paths": { "0:4": { "crate_id": 0, "path": ["work2", "Public"], "kind": "struct" }, "0:0": { "crate_id": 0, "path": ["work2"], "kind": "module" } }, "external_crates": {}, "format_version": 1 }json
{ "root": "0:0", "crate_version": null, "includes_private": false, "index": { "0:6": { "id": "0:6", "inner": { "span": "inner::Public", "name": "Reexported", "id": "0:4", "glob": false }, "kind": "import", "name": null, "visibility": "public" }, "0:3": { "id": "0:3", "inner": { "is_crate": false, "items": ["0:4"] }, "kind": "module", "name": "inner", "visibility": "public" }, "0:0": { "id": "0:0", "inner": { "is_crate": true, "items": ["0:6", "0:3"] }, "kind": "module", "name": "work3", "visibility": "public" }, "0:4": { "id": "0:4", "inner": { "struct_type": "unit", "generics": { "params": [], "where_predicates": [] }, "fields_stripped": false, "fields": [], "impls": ["0:9", "0:10", "0:11", "0:13", "0:14"] }, "kind": "struct", "name": "Public", "visibility": "public" } }, "paths": { "0:4": { "crate_id": 0, "path": ["work3", "inner", "Public"], "kind": "struct" }, "0:3": { "crate_id": 0, "path": ["work3", "inner"], "kind": "module" }, "0:0": { "crate_id": 0, "path": ["work3"], "kind": "module" } }, "external_crates": {}, "format_version": 1 }Whats happening
The panic is here
rust/src/librustdoc/json/mod.rs
Lines 163 to 169 in db69136
inner::Publicis being added to the index when is shouldn't (I think), so whenReexportedis added, the IDs colide, and we bail.I think the solution is that
inner::Publicshould never have been added into the index.