diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-05-02 17:49:32 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2021-05-02 18:00:20 +0200 |
| commit | 4a6cfc6788800d0ba26d2295dfa1eb460e5ab887 (patch) | |
| tree | 973632021eff70b1b868281b1e37221259eb22cc | |
| parent | 0447f91e10d4f95ef2ff35b253e1964ed7c5f9fc (diff) | |
| download | rust-4a6cfc6788800d0ba26d2295dfa1eb460e5ab887.tar.gz rust-4a6cfc6788800d0ba26d2295dfa1eb460e5ab887.zip | |
Don't arena allocate Definitions
| -rw-r--r-- | compiler/rustc_middle/src/ty/context.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 9e90dadfff9..c9510f2deb4 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -967,7 +967,7 @@ pub struct GlobalCtxt<'tcx> { export_map: ExportMap<LocalDefId>, pub(crate) untracked_crate: &'tcx hir::Crate<'tcx>, - pub(crate) definitions: &'tcx Definitions, + pub(crate) definitions: Definitions, /// This provides access to the incremental compilation on-disk cache for query results. /// Do not access this directly. It is only meant to be used by @@ -1163,7 +1163,7 @@ impl<'tcx> TyCtxt<'tcx> { glob_map: resolutions.glob_map, extern_prelude: resolutions.extern_prelude, untracked_crate: krate, - definitions: arena.alloc(resolutions.definitions), + definitions: resolutions.definitions, on_disk_cache, queries, query_caches: query::QueryCaches::default(), @@ -1319,14 +1319,14 @@ impl<'tcx> TyCtxt<'tcx> { pub fn create_stable_hashing_context(self) -> StableHashingContext<'tcx> { let krate = self.gcx.untracked_crate; - StableHashingContext::new(self.sess, krate, self.definitions, &*self.cstore) + StableHashingContext::new(self.sess, krate, &self.definitions, &*self.cstore) } #[inline(always)] pub fn create_no_span_stable_hashing_context(self) -> StableHashingContext<'tcx> { let krate = self.gcx.untracked_crate; - StableHashingContext::ignore_spans(self.sess, krate, self.definitions, &*self.cstore) + StableHashingContext::ignore_spans(self.sess, krate, &self.definitions, &*self.cstore) } pub fn serialize_query_result_cache(self, encoder: &mut FileEncoder) -> FileEncodeResult { |
