about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_query_impl/src/lib.rs')
-rw-r--r--compiler/rustc_query_impl/src/lib.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_query_impl/src/lib.rs b/compiler/rustc_query_impl/src/lib.rs
index 7e053735aa9..7001a1eed57 100644
--- a/compiler/rustc_query_impl/src/lib.rs
+++ b/compiler/rustc_query_impl/src/lib.rs
@@ -45,12 +45,11 @@ pub use on_disk_cache::OnDiskCache;
 mod profiling_support;
 pub use self::profiling_support::alloc_self_profile_query_strings;
 
-trait QueryToConfig<'tcx>: 'tcx {
-    type Value;
-    type Config: QueryConfig<QueryCtxt<'tcx>>;
+/// This is implemented per query and restoring query values from their erased state.
+trait QueryConfigRestored<'tcx>: QueryConfig<QueryCtxt<'tcx>> + Default {
+    type RestoredValue;
 
-    fn config(qcx: QueryCtxt<'tcx>) -> Self::Config;
-    fn restore(value: <Self::Config as QueryConfig<QueryCtxt<'tcx>>>::Value) -> Self::Value;
+    fn restore(value: <Self as QueryConfig<QueryCtxt<'tcx>>>::Value) -> Self::RestoredValue;
 }
 
 rustc_query_append! { define_queries! }