diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-11-04 20:16:03 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-11-04 20:16:03 +0000 |
| commit | a3b964b9ea362b42da05b8b69a5be4a6a2cca9a7 (patch) | |
| tree | 3926e11adeb403fbc3d4fc92622a4d745a26a5c7 /compiler/rustc_incremental/src | |
| parent | 9c8a2694fadf3900c4d7880f6357cee60e9aa39b (diff) | |
| download | rust-a3b964b9ea362b42da05b8b69a5be4a6a2cca9a7.tar.gz rust-a3b964b9ea362b42da05b8b69a5be4a6a2cca9a7.zip | |
Remove unused LoadResult::DecodeIncrCache variant
Diffstat (limited to 'compiler/rustc_incremental/src')
| -rw-r--r-- | compiler/rustc_incremental/src/errors.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_incremental/src/persist/load.rs | 11 |
2 files changed, 1 insertions, 16 deletions
diff --git a/compiler/rustc_incremental/src/errors.rs b/compiler/rustc_incremental/src/errors.rs index 05ed4f7598d..61bb0353a9f 100644 --- a/compiler/rustc_incremental/src/errors.rs +++ b/compiler/rustc_incremental/src/errors.rs @@ -271,12 +271,6 @@ pub struct LoadDepGraph { } #[derive(Diagnostic)] -#[diag(incremental_decode_incr_cache)] -pub struct DecodeIncrCache { - pub err: String, -} - -#[derive(Diagnostic)] #[diag(incremental_write_dep_graph)] pub struct WriteDepGraph<'a> { pub path: &'a Path, diff --git a/compiler/rustc_incremental/src/persist/load.rs b/compiler/rustc_incremental/src/persist/load.rs index cbd55fe4205..6dfc4096910 100644 --- a/compiler/rustc_incremental/src/persist/load.rs +++ b/compiler/rustc_incremental/src/persist/load.rs @@ -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); |
