Skip to content

Commit 629ee74

Browse files
authored
Rollup merge of #117588 - bjorn3:remove_unused_error_variant, r=cjgillot
Remove unused LoadResult::DecodeIncrCache variant
2 parents fb30270 + a3b964b commit 629ee74

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

compiler/rustc_incremental/messages.ftl

-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ incremental_create_lock =
3030
incremental compilation: could not create session directory lock file: {$lock_err}
3131
incremental_create_new = failed to create {$name} at `{$path}`: {$err}
3232
33-
incremental_decode_incr_cache = could not decode incremental cache: {$err}
34-
3533
incremental_delete_full = error deleting incremental compilation session directory `{$path}`: {$err}
3634
3735
incremental_delete_incompatible =

compiler/rustc_incremental/src/errors.rs

-6
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,6 @@ pub struct LoadDepGraph {
270270
pub err: std::io::Error,
271271
}
272272

273-
#[derive(Diagnostic)]
274-
#[diag(incremental_decode_incr_cache)]
275-
pub struct DecodeIncrCache {
276-
pub err: String,
277-
}
278-
279273
#[derive(Diagnostic)]
280274
#[diag(incremental_write_dep_graph)]
281275
pub struct WriteDepGraph<'a> {

compiler/rustc_incremental/src/persist/load.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ pub enum LoadResult<T> {
3030
DataOutOfDate,
3131
/// Loading the dep graph failed.
3232
LoadDepGraph(PathBuf, std::io::Error),
33-
/// Decoding loaded incremental cache failed.
34-
DecodeIncrCache(Box<dyn std::any::Any + Send>),
3533
}
3634

3735
impl<T: Default> LoadResult<T> {
@@ -44,9 +42,7 @@ impl<T: Default> LoadResult<T> {
4442
}
4543
(
4644
Some(IncrementalStateAssertion::Loaded),
47-
LoadResult::LoadDepGraph(..)
48-
| LoadResult::DecodeIncrCache(..)
49-
| LoadResult::DataOutOfDate,
45+
LoadResult::LoadDepGraph(..) | LoadResult::DataOutOfDate,
5046
) => {
5147
sess.emit_fatal(errors::AssertLoaded);
5248
}
@@ -58,10 +54,6 @@ impl<T: Default> LoadResult<T> {
5854
sess.emit_warning(errors::LoadDepGraph { path, err });
5955
Default::default()
6056
}
61-
LoadResult::DecodeIncrCache(err) => {
62-
sess.emit_warning(errors::DecodeIncrCache { err: format!("{err:?}") });
63-
Default::default()
64-
}
6557
LoadResult::DataOutOfDate => {
6658
if let Err(err) = delete_all_session_dir_contents(sess) {
6759
sess.emit_err(errors::DeleteIncompatible { path: dep_graph_path(sess), err });
@@ -150,7 +142,6 @@ fn load_dep_graph(sess: &Session) -> LoadResult<(SerializedDepGraph, WorkProduct
150142
match load_data(&path, sess) {
151143
LoadResult::DataOutOfDate => LoadResult::DataOutOfDate,
152144
LoadResult::LoadDepGraph(path, err) => LoadResult::LoadDepGraph(path, err),
153-
LoadResult::DecodeIncrCache(err) => LoadResult::DecodeIncrCache(err),
154145
LoadResult::Ok { data: (bytes, start_pos) } => {
155146
let mut decoder = MemDecoder::new(&bytes, start_pos);
156147
let prev_commandline_args_hash = u64::decode(&mut decoder);

0 commit comments

Comments
 (0)