From dba52ced4ca8f1ea8f8ee10390797c60e67c22c5 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Wed, 20 Dec 2017 16:38:27 +0100 Subject: [PATCH] incr.comp.: Cache check_match query. --- src/librustc/ty/maps/config.rs | 1 + src/librustc/ty/maps/on_disk_cache.rs | 1 + src/librustc/ty/maps/plumbing.rs | 1 + src/librustc/util/common.rs | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/librustc/ty/maps/config.rs b/src/librustc/ty/maps/config.rs index a556861147e..5ca951d0fb3 100644 --- a/src/librustc/ty/maps/config.rs +++ b/src/librustc/ty/maps/config.rs @@ -647,5 +647,6 @@ impl_disk_cacheable_query!(unsafety_check_result, |def_id| def_id.is_local()); impl_disk_cacheable_query!(borrowck, |def_id| def_id.is_local()); impl_disk_cacheable_query!(mir_borrowck, |def_id| def_id.is_local()); impl_disk_cacheable_query!(mir_const_qualif, |def_id| def_id.is_local()); +impl_disk_cacheable_query!(check_match, |def_id| def_id.is_local()); impl_disk_cacheable_query!(contains_extern_indicator, |_| true); impl_disk_cacheable_query!(def_symbol_name, |_| true); diff --git a/src/librustc/ty/maps/on_disk_cache.rs b/src/librustc/ty/maps/on_disk_cache.rs index 079b518efd8..dd8a7223289 100644 --- a/src/librustc/ty/maps/on_disk_cache.rs +++ b/src/librustc/ty/maps/on_disk_cache.rs @@ -217,6 +217,7 @@ impl<'sess> OnDiskCache<'sess> { encode_query_results::(tcx, enc, qri)?; encode_query_results::(tcx, enc, qri)?; encode_query_results::(tcx, enc, qri)?; + encode_query_results::(tcx, enc, qri)?; } // Encode diagnostics diff --git a/src/librustc/ty/maps/plumbing.rs b/src/librustc/ty/maps/plumbing.rs index 8875439be6b..49440deb6de 100644 --- a/src/librustc/ty/maps/plumbing.rs +++ b/src/librustc/ty/maps/plumbing.rs @@ -978,4 +978,5 @@ impl_load_from_cache!( SymbolName => def_symbol_name, ConstIsRvaluePromotableToStatic => const_is_rvalue_promotable_to_static, ContainsExternIndicator => contains_extern_indicator, + CheckMatch => check_match, ); diff --git a/src/librustc/util/common.rs b/src/librustc/util/common.rs index 76d3494dbf0..29af9bb668e 100644 --- a/src/librustc/util/common.rs +++ b/src/librustc/util/common.rs @@ -29,7 +29,7 @@ pub const FN_OUTPUT_NAME: &'static str = "Output"; // Useful type to use with `Result<>` indicate that an error has already // been reported to the user, so no need to continue checking. -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, RustcEncodable, RustcDecodable)] pub struct ErrorReported; thread_local!(static TIME_DEPTH: Cell = Cell::new(0));