about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-05 11:47:38 +0000
committerbors <bors@rust-lang.org>2023-11-05 11:47:38 +0000
commit04817ff00cfa1ec00a9babcb2ade1e3f2874d9bd (patch)
tree0b6bfd85de61c1dd13923e235636a37757653b8e /compiler
parent513a48517ed80cb979d88e7eb7fbcf761a35620b (diff)
parenta6605163346d7680502d8e2c1e5aaf1dc3229e41 (diff)
downloadrust-04817ff00cfa1ec00a9babcb2ade1e3f2874d9bd.tar.gz
rust-04817ff00cfa1ec00a9babcb2ade1e3f2874d9bd.zip
Auto merge of #117608 - matthiaskrgr:rollup-g9fagmv, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #116017 (Don't pass `-stdlib=libc++` when building C files on macOS)
 - #117524 (bootstrap/setup: create hooks directory if non-existing)
 - #117588 (Remove unused LoadResult::DecodeIncrCache variant)
 - #117596 (Add diagnostic items for a few of core's builtin macros)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_incremental/messages.ftl2
-rw-r--r--compiler/rustc_incremental/src/errors.rs6
-rw-r--r--compiler/rustc_incremental/src/persist/load.rs11
3 files changed, 1 insertions, 18 deletions
diff --git a/compiler/rustc_incremental/messages.ftl b/compiler/rustc_incremental/messages.ftl
index 5d885e07192..e74173b24a9 100644
--- a/compiler/rustc_incremental/messages.ftl
+++ b/compiler/rustc_incremental/messages.ftl
@@ -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 =
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);