Add Freeze type and use it to store Definitions

This commit is contained in:
John Kåre Alsaker 2023-08-31 09:16:33 +02:00
parent 9dc11a13fa
commit 0c96a9260b
6 changed files with 122 additions and 15 deletions

View file

@ -1207,7 +1207,7 @@ pub(super) fn crate_hash(tcx: TyCtxt<'_>, _: LocalCrate) -> Svh {
source_file_names.hash_stable(&mut hcx, &mut stable_hasher);
debugger_visualizers.hash_stable(&mut hcx, &mut stable_hasher);
if tcx.sess.opts.incremental_relative_spans() {
let definitions = tcx.definitions_untracked();
let definitions = tcx.untracked().definitions.freeze();
let mut owner_spans: Vec<_> = krate
.owners
.iter_enumerated()