diff options
| author | bors <bors@rust-lang.org> | 2022-06-15 05:39:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-15 05:39:29 +0000 |
| commit | 389352c4bbd56024eefd1566e06dcba04d223f92 (patch) | |
| tree | edb2f035bc8ad77fd480002ddfc6d6562cde5a2f /compiler/rustc_query_impl/src/on_disk_cache.rs | |
| parent | ddb6cc85243ac4761fbc32a407b10216544fe57b (diff) | |
| parent | 1b8fc2f8f66f49bfa1538eeac2a9bd776833b22f (diff) | |
| download | rust-389352c4bbd56024eefd1566e06dcba04d223f92.tar.gz rust-389352c4bbd56024eefd1566e06dcba04d223f92.zip | |
Auto merge of #98123 - JohnTitor:rollup-rfg1a4s, r=JohnTitor
Rollup of 7 pull requests Successful merges: - #97822 (Filter out intrinsics if we have other import candidates to suggest) - #98026 (Move some tests to more reasonable directories) - #98067 (compiler: remove unused deps) - #98078 (Use unchecked mul to compute slice sizes) - #98083 (Rename rustc_serialize::opaque::Encoder as MemEncoder.) - #98087 (Suggest adding a `#[macro_export]` to a private macro) - #98113 (Fix misspelling of "constraint" as "contraint") Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_query_impl/src/on_disk_cache.rs')
| -rw-r--r-- | compiler/rustc_query_impl/src/on_disk_cache.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_query_impl/src/on_disk_cache.rs b/compiler/rustc_query_impl/src/on_disk_cache.rs index c2c876f7f1a..d7327ca4bc6 100644 --- a/compiler/rustc_query_impl/src/on_disk_cache.rs +++ b/compiler/rustc_query_impl/src/on_disk_cache.rs @@ -15,7 +15,7 @@ use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_query_system::dep_graph::DepContext; use rustc_query_system::query::{QueryCache, QueryContext, QuerySideEffects}; use rustc_serialize::{ - opaque::{self, FileEncodeResult, FileEncoder, IntEncodedWithFixedSize}, + opaque::{FileEncodeResult, FileEncoder, IntEncodedWithFixedSize, MemDecoder}, Decodable, Decoder, Encodable, Encoder, }; use rustc_session::Session; @@ -158,7 +158,7 @@ impl<'sess> rustc_middle::ty::OnDiskCache<'sess> for OnDiskCache<'sess> { // Wrap in a scope so we can borrow `data`. let footer: Footer = { - let mut decoder = opaque::Decoder::new(&data, start_pos); + let mut decoder = MemDecoder::new(&data, start_pos); // Decode the *position* of the footer, which can be found in the // last 8 bytes of the file. @@ -437,7 +437,7 @@ impl<'sess> OnDiskCache<'sess> { let serialized_data = self.serialized_data.read(); let mut decoder = CacheDecoder { tcx, - opaque: opaque::Decoder::new(serialized_data.as_deref().unwrap_or(&[]), pos.to_usize()), + opaque: MemDecoder::new(serialized_data.as_deref().unwrap_or(&[]), pos.to_usize()), source_map: self.source_map, file_index_to_file: &self.file_index_to_file, file_index_to_stable_id: &self.file_index_to_stable_id, @@ -458,7 +458,7 @@ impl<'sess> OnDiskCache<'sess> { /// will also handle things that contain `Ty` instances. pub struct CacheDecoder<'a, 'tcx> { tcx: TyCtxt<'tcx>, - opaque: opaque::Decoder<'a>, + opaque: MemDecoder<'a>, source_map: &'a SourceMap, file_index_to_file: &'a Lock<FxHashMap<SourceFileIndex, Lrc<SourceFile>>>, file_index_to_stable_id: &'a FxHashMap<SourceFileIndex, EncodedSourceFileId>, @@ -510,7 +510,7 @@ trait DecoderWithPosition: Decoder { fn position(&self) -> usize; } -impl<'a> DecoderWithPosition for opaque::Decoder<'a> { +impl<'a> DecoderWithPosition for MemDecoder<'a> { fn position(&self) -> usize { self.position() } @@ -586,7 +586,7 @@ impl<'a, 'tcx> TyDecoder for CacheDecoder<'a, 'tcx> { { debug_assert!(pos < self.opaque.data.len()); - let new_opaque = opaque::Decoder::new(self.opaque.data, pos); + let new_opaque = MemDecoder::new(self.opaque.data, pos); let old_opaque = mem::replace(&mut self.opaque, new_opaque); let r = f(self); self.opaque = old_opaque; |
