diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-06-08 09:17:49 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-06-08 09:50:44 +1000 |
| commit | b983e42936feab29f6333e9835913afc6b4a394e (patch) | |
| tree | 5d7fc6c27501a3647f4b4c3e81ecb24ec26a51ce /compiler/rustc_incremental/src | |
| parent | dc08bc51f2c58a0f5f815a07f9bb3d671153b5a1 (diff) | |
| download | rust-b983e42936feab29f6333e9835913afc6b4a394e.tar.gz rust-b983e42936feab29f6333e9835913afc6b4a394e.zip | |
Rename `rustc_serialize::opaque::Encoder` as `MemEncoder`.
This avoids the name clash with `rustc_serialize::Encoder` (a trait), and allows lots qualifiers to be removed and imports to be simplified (e.g. fewer `as` imports).
Diffstat (limited to 'compiler/rustc_incremental/src')
| -rw-r--r-- | compiler/rustc_incremental/src/persist/load.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_incremental/src/persist/save.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_incremental/src/persist/load.rs b/compiler/rustc_incremental/src/persist/load.rs index 9de14950aa8..9c325faae80 100644 --- a/compiler/rustc_incremental/src/persist/load.rs +++ b/compiler/rustc_incremental/src/persist/load.rs @@ -4,7 +4,7 @@ use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::memmap::Mmap; use rustc_middle::dep_graph::{SerializedDepGraph, WorkProduct, WorkProductId}; use rustc_middle::ty::OnDiskCache; -use rustc_serialize::opaque::Decoder; +use rustc_serialize::opaque::MemDecoder; use rustc_serialize::Decodable; use rustc_session::config::IncrementalStateAssertion; use rustc_session::Session; @@ -156,7 +156,7 @@ pub fn load_dep_graph(sess: &Session) -> DepGraphFuture { if let LoadResult::Ok { data: (work_products_data, start_pos) } = load_result { // Decode the list of work_products - let mut work_product_decoder = Decoder::new(&work_products_data[..], start_pos); + let mut work_product_decoder = MemDecoder::new(&work_products_data[..], start_pos); let work_products: Vec<SerializedWorkProduct> = Decodable::decode(&mut work_product_decoder); @@ -193,7 +193,7 @@ pub fn load_dep_graph(sess: &Session) -> DepGraphFuture { LoadResult::DataOutOfDate => LoadResult::DataOutOfDate, LoadResult::Error { message } => LoadResult::Error { message }, LoadResult::Ok { data: (bytes, start_pos) } => { - let mut decoder = Decoder::new(&bytes, start_pos); + let mut decoder = MemDecoder::new(&bytes, start_pos); let prev_commandline_args_hash = u64::decode(&mut decoder); if prev_commandline_args_hash != expected_hash { diff --git a/compiler/rustc_incremental/src/persist/save.rs b/compiler/rustc_incremental/src/persist/save.rs index 79836d66011..b34c7ad1f8a 100644 --- a/compiler/rustc_incremental/src/persist/save.rs +++ b/compiler/rustc_incremental/src/persist/save.rs @@ -3,7 +3,7 @@ use rustc_data_structures::sync::join; use rustc_middle::dep_graph::{DepGraph, SerializedDepGraph, WorkProduct, WorkProductId}; use rustc_middle::ty::TyCtxt; use rustc_serialize::opaque::{FileEncodeResult, FileEncoder}; -use rustc_serialize::Encodable as RustcEncodable; +use rustc_serialize::Encodable; use rustc_session::Session; use std::fs; |
