Move DepKind to rustc_query_system and define it as u16

This commit is contained in:
John Kåre Alsaker
2023-09-15 15:39:11 +02:00
parent 66ab7e6883
commit 1806efe7f2
24 changed files with 509 additions and 519 deletions

View File

@@ -92,7 +92,7 @@ where
}
#[inline(always)]
fn query_state<'a>(self, qcx: QueryCtxt<'tcx>) -> &'a QueryState<Self::Key, DepKind>
fn query_state<'a>(self, qcx: QueryCtxt<'tcx>) -> &'a QueryState<Self::Key>
where
QueryCtxt<'tcx>: 'a,
{
@@ -145,7 +145,7 @@ where
fn value_from_cycle_error(
self,
tcx: TyCtxt<'tcx>,
cycle: &[QueryInfo<DepKind>],
cycle: &[QueryInfo],
guar: ErrorGuaranteed,
) -> Self::Value {
(self.dynamic.value_from_cycle_error)(tcx, cycle, guar)
@@ -198,6 +198,8 @@ trait QueryConfigRestored<'tcx> {
type RestoredValue;
type Config: QueryConfig<QueryCtxt<'tcx>>;
const NAME: &'static &'static str;
fn config(tcx: TyCtxt<'tcx>) -> Self::Config;
fn restore(value: <Self::Config as QueryConfig<QueryCtxt<'tcx>>>::Value)
-> Self::RestoredValue;