We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 71927ad commit 1cec923Copy full SHA for 1cec923
compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs
@@ -490,6 +490,9 @@ pub(in crate::rmeta) fn provide(providers: &mut Providers) {
490
.alloc_slice(&CStore::from_tcx(tcx).crate_dependencies_in_postorder(LOCAL_CRATE))
491
},
492
crates: |tcx, ()| {
493
+ // The list of loaded crates is now frozen in query cache,
494
+ // so make sure cstore is not mutably accessed from here on.
495
+ tcx.untracked().cstore.leak();
496
tcx.arena.alloc_from_iter(CStore::from_tcx(tcx).iter_crate_data().map(|(cnum, _)| cnum))
497
498
..*providers
0 commit comments