Skip to content

Commit

Permalink
Unrolled build for rust-lang#117588
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#117588 - bjorn3:remove_unused_error_variant, r=cjgillot

Remove unused LoadResult::DecodeIncrCache variant
  • Loading branch information
rust-timer authored Nov 5, 2023
2 parents 513a485 + a3b964b commit 6bc395b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
2 changes: 0 additions & 2 deletions compiler/rustc_incremental/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ incremental_create_lock =
incremental compilation: could not create session directory lock file: {$lock_err}
incremental_create_new = failed to create {$name} at `{$path}`: {$err}
incremental_decode_incr_cache = could not decode incremental cache: {$err}
incremental_delete_full = error deleting incremental compilation session directory `{$path}`: {$err}
incremental_delete_incompatible =
Expand Down
6 changes: 0 additions & 6 deletions compiler/rustc_incremental/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,6 @@ pub struct LoadDepGraph {
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_decode_incr_cache)]
pub struct DecodeIncrCache {
pub err: String,
}

#[derive(Diagnostic)]
#[diag(incremental_write_dep_graph)]
pub struct WriteDepGraph<'a> {
Expand Down
11 changes: 1 addition & 10 deletions compiler/rustc_incremental/src/persist/load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand All @@ -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);
}
Expand All @@ -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 });
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6bc395b

Please sign in to comment.