mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Don't try to promote queries that never cache to disk
This commit is contained in:
@@ -104,6 +104,7 @@ pub(crate) fn Metadata<'tcx>() -> DepKindVTable<'tcx> {
|
||||
/// Called from macro-generated code for each query.
|
||||
pub(crate) fn make_dep_kind_vtable_for_query<'tcx, Q>(
|
||||
is_anon: bool,
|
||||
is_cache_on_disk: bool,
|
||||
is_eval_always: bool,
|
||||
) -> DepKindVTable<'tcx>
|
||||
where
|
||||
@@ -127,7 +128,8 @@ pub(crate) fn make_dep_kind_vtable_for_query<'tcx, Q>(
|
||||
is_eval_always,
|
||||
key_fingerprint_style,
|
||||
force_from_dep_node_fn: can_recover.then_some(force_from_dep_node_inner::<Q>),
|
||||
promote_from_disk_fn: can_recover.then_some(promote_from_disk_inner::<Q>),
|
||||
promote_from_disk_fn: (can_recover && is_cache_on_disk)
|
||||
.then_some(promote_from_disk_inner::<Q>),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -697,6 +697,7 @@ pub(crate) fn $name<'tcx>() -> DepKindVTable<'tcx> {
|
||||
use $crate::query_impl::$name::VTableGetter;
|
||||
make_dep_kind_vtable_for_query::<VTableGetter>(
|
||||
is_anon!([$($modifiers)*]),
|
||||
if_cache_on_disk!([$($modifiers)*] true false),
|
||||
is_eval_always!([$($modifiers)*]),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user