From 0f0f3138cb80137b9277b29118c05dbff9a8915e Mon Sep 17 00:00:00 2001 From: Camille Gillot Date: Tue, 1 Jun 2021 09:05:22 +0200 Subject: Revert "Reduce the amount of untracked state in TyCtxt" --- compiler/rustc_query_impl/src/profiling_support.rs | 2 +- compiler/rustc_query_impl/src/stats.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_query_impl/src') diff --git a/compiler/rustc_query_impl/src/profiling_support.rs b/compiler/rustc_query_impl/src/profiling_support.rs index 95edc1e93a5..2517793ecea 100644 --- a/compiler/rustc_query_impl/src/profiling_support.rs +++ b/compiler/rustc_query_impl/src/profiling_support.rs @@ -61,7 +61,7 @@ impl<'p, 'c, 'tcx> QueryKeyStringBuilder<'p, 'c, 'tcx> { match def_key.disambiguated_data.data { DefPathData::CrateRoot => { - crate_name = self.tcx.crate_name(def_id.krate).as_str(); + crate_name = self.tcx.original_crate_name(def_id.krate).as_str(); name = &*crate_name; dis = ""; end_index = 3; diff --git a/compiler/rustc_query_impl/src/stats.rs b/compiler/rustc_query_impl/src/stats.rs index fa48df3ed45..e877034bd7b 100644 --- a/compiler/rustc_query_impl/src/stats.rs +++ b/compiler/rustc_query_impl/src/stats.rs @@ -108,7 +108,7 @@ pub fn print_stats(tcx: TyCtxt<'_>) { queries.iter().filter(|q| q.local_def_id_keys.is_some()).collect(); def_id_density.sort_by_key(|q| q.local_def_id_keys.unwrap()); eprintln!("\nLocal DefId density:"); - let total = tcx.resolutions(()).definitions.def_index_count() as f64; + let total = tcx.hir().definitions().def_index_count() as f64; for q in def_id_density.iter().rev() { let local = q.local_def_id_keys.unwrap(); eprintln!(" {} - {} = ({}%)", q.name, local, (local as f64 * 100.0) / total); -- cgit 1.4.1-3-g733a5