We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8b957d commit 4537025Copy full SHA for 4537025
src/librustc_metadata/cstore.rs
@@ -96,6 +96,10 @@ pub struct CStore {
96
impl CStore {
97
pub fn new(metadata_loader: Box<MetadataLoader + Sync>) -> CStore {
98
CStore {
99
+ // We add an empty entry for LOCAL_CRATE (which maps to zero) in
100
+ // order to make array indices in `metas` match with the
101
+ // corresponding `CrateNum`. This first entry will always remain
102
+ // `None`.
103
metas: RwLock::new(IndexVec::from_elem_n(None, 1)),
104
extern_mod_crate_map: Lock::new(FxHashMap()),
105
metadata_loader,
0 commit comments