summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_incremental/src/persist/load.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_incremental/src/persist/load.rs')
-rw-r--r--compiler/rustc_incremental/src/persist/load.rs13
1 files changed, 2 insertions, 11 deletions
diff --git a/compiler/rustc_incremental/src/persist/load.rs b/compiler/rustc_incremental/src/persist/load.rs
index 2310d0b12..6dfc40969 100644
--- a/compiler/rustc_incremental/src/persist/load.rs
+++ b/compiler/rustc_incremental/src/persist/load.rs
@@ -1,4 +1,4 @@
-//! Code to save/load the dep-graph from files.
+//! Code to load the dep-graph from files.
use crate::errors;
use rustc_data_structures::memmap::Mmap;
@@ -30,8 +30,6 @@ pub enum LoadResult<T> {
DataOutOfDate,
/// Loading the dep graph failed.
LoadDepGraph(PathBuf, std::io::Error),
- /// Decoding loaded incremental cache failed.
- DecodeIncrCache(Box<dyn std::any::Any + Send>),
}
impl<T: Default> LoadResult<T> {
@@ -44,9 +42,7 @@ impl<T: Default> LoadResult<T> {
}
(
Some(IncrementalStateAssertion::Loaded),
- LoadResult::LoadDepGraph(..)
- | LoadResult::DecodeIncrCache(..)
- | LoadResult::DataOutOfDate,
+ LoadResult::LoadDepGraph(..) | LoadResult::DataOutOfDate,
) => {
sess.emit_fatal(errors::AssertLoaded);
}
@@ -58,10 +54,6 @@ impl<T: Default> LoadResult<T> {
sess.emit_warning(errors::LoadDepGraph { path, err });
Default::default()
}
- LoadResult::DecodeIncrCache(err) => {
- sess.emit_warning(errors::DecodeIncrCache { err: format!("{err:?}") });
- Default::default()
- }
LoadResult::DataOutOfDate => {
if let Err(err) = delete_all_session_dir_contents(sess) {
sess.emit_err(errors::DeleteIncompatible { path: dep_graph_path(sess), err });
@@ -150,7 +142,6 @@ fn load_dep_graph(sess: &Session) -> LoadResult<(SerializedDepGraph, WorkProduct
match load_data(&path, sess) {
LoadResult::DataOutOfDate => LoadResult::DataOutOfDate,
LoadResult::LoadDepGraph(path, err) => LoadResult::LoadDepGraph(path, err),
- LoadResult::DecodeIncrCache(err) => LoadResult::DecodeIncrCache(err),
LoadResult::Ok { data: (bytes, start_pos) } => {
let mut decoder = MemDecoder::new(&bytes, start_pos);
let prev_commandline_args_hash = u64::decode(&mut decoder);