Move TRY_LOAD_FROM_DISK
out of rustc_queries
to rustc_query_impl
We want to refer to `crate::plumbing::try_load_from_disk` in the const, but hard-coding it in rustc_queries, where we don't yet know the crate this macro will be called in, seems kind of hacky. Do it in query_impl instead.
This commit is contained in:
parent
7208bdee33
commit
9273782d55
2 changed files with 7 additions and 5 deletions
|
@ -412,6 +412,9 @@ macro_rules! define_queries {
|
|||
impl<'tcx> QueryDescription<QueryCtxt<'tcx>> for queries::$name<'tcx> {
|
||||
rustc_query_description! { $name }
|
||||
|
||||
const TRY_LOAD_FROM_DISK: Option<fn(QueryCtxt<'tcx>, SerializedDepNodeIndex) -> Option<Self::Value>>
|
||||
= should_ever_cache_on_disk!([$($modifiers)*]);
|
||||
|
||||
type Cache = query_storage::$name<'tcx>;
|
||||
|
||||
#[inline(always)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue