Rustdoc JSON includes unexpected items from core
and alloc
#114039
Labels
A-rustdoc-json
Area: Rustdoc JSON backend
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Generated rustdoc JSON for every one of dozens of crates I've looked at seems to contain unexpected inlined items that look like an
impl str
block and its contents.I expected to see this happen: rustdoc JSON file contains only the items defined or re-exported by the corresponding crate.
Instead, this happened: the rustdoc JSON file contains items like this:
In this example,
crate_id: 2
iscore
and here are the names of the items contained in that impl (also part of the rustdoc JSON):Similarly, you can find items from
alloc
: Trustfall playgroundInvocation for generating rustdoc JSON:
Meta
rustc --version --verbose
:You can find a variety of pre-generated rustdoc JSON files with this issue here: https://github.com/obi1kenobi/crates-rustdoc/tree/main/rustdoc-v26/max-version
Briefly discussed in Zulip: https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Rustdoc.20JSON.3A.20Unexpected.20.60core.60.20items.20included.20in.20output
I'll have to work around this behavior to shield
cargo-semver-checks
, which uses the same codebase as the playground link above. I can hold off on updating the playground for, say, another week, but at some point I'll need to upgrade it to include my workaround which means those items will cease being shown.@rustbot label +T-rustdoc +A-rustdoc-json
The text was updated successfully, but these errors were encountered: