Closed
Description
While investigating the root cause(s) of #46112 and discussing (in the #rustc
IRC chat room) the use of a hashmap mapping crate-numbers to crate-metadata, @eddyb at some point exclaimed "why is that not an IndexVec
?"
One word: Legacy. Big time: the metas
field has been a hashmap ever since metadata::cstore
was introduced, 6.5 years ago in b23ecd4 (relevant line in diff)
It should be a useful (and hopefully simple?) exercise to replace the hashmap that is now there with an IndexVec
.