Fix primitive retrieval in search index generation by GuillaumeGomez · Pull Request #74879 · rust-lang/rust (original) (raw)

Part of #60485. Fixes #74780.

Before merging, I have a few questions remaining:

Should we remove the primitive_locations field from the Cache type? If so, we'll have to replace in the few places where we use this field (not really a problem). However, this field includes the primitive types of the current crates, whereas my new implementation only includes the ones coming from external crates. I'm not sure if it'll be an issue for libcore or not (maybe not since they can be retrieved directly inside the crate, no?).

EDIT: I removed the primitive_locations field from the Cache type, so now we're only referring/using the new "primitives cache" added by this PR.

cc @rust-lang/rustdoc

r? @Manishearth