diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-06-06 11:30:08 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-06-20 11:58:46 +0200 |
| commit | cbdfbdd40bb6c25cf33c922339f0b303d0576377 (patch) | |
| tree | df5524cd2173a62a90d1a10a9d9b25ccfbf407e2 /compiler/rustc_metadata/src | |
| parent | ed9ee25108bdeaa60e47c71db2f8db3e974d16fa (diff) | |
| download | rust-cbdfbdd40bb6c25cf33c922339f0b303d0576377.tar.gz rust-cbdfbdd40bb6c25cf33c922339f0b303d0576377.zip | |
Implement the query in cstore_impl.
Diffstat (limited to 'compiler/rustc_metadata/src')
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs index 9a97835d9c0..5e116122179 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs @@ -4,7 +4,6 @@ use crate::native_libs; use crate::rmeta::encoder; use rustc_ast as ast; -use rustc_ast::expand::allocator::AllocatorKind; use rustc_data_structures::stable_map::FxHashMap; use rustc_data_structures::svh::Svh; use rustc_hir as hir; @@ -242,6 +241,7 @@ pub fn provide(providers: &mut Providers) { // therefore no actual inputs, they're just reading tables calculated in // resolve! Does this work? Unsure! That's what the issue is about *providers = Providers { + allocator_kind: |tcx, ()| CStore::from_tcx(tcx).allocator_kind(), is_dllimport_foreign_item: |tcx, id| match tcx.native_library_kind(id) { Some( NativeLibKind::Dylib { .. } | NativeLibKind::RawDylib | NativeLibKind::Unspecified, @@ -535,8 +535,4 @@ impl CrateStore for CStore { fn encode_metadata(&self, tcx: TyCtxt<'_>) -> EncodedMetadata { encoder::encode_metadata(tcx) } - - fn allocator_kind(&self) -> Option<AllocatorKind> { - self.allocator_kind() - } } |
