File tree 2 files changed +3
-6
lines changed
2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ pub(crate) trait QueryAccessors<'tcx>: QueryConfig<'tcx> {
79
79
fn to_dep_node ( tcx : TyCtxt < ' tcx > , key : & Self :: Key ) -> DepNode ;
80
80
81
81
// Don't use this method to compute query results, instead use the methods on TyCtxt
82
- fn compute ( tcx : TyCtxt < ' tcx > , key : Self :: Key ) -> Self :: Value ;
82
+ const COMPUTE_FN : fn ( TyCtxt < ' tcx > , Self :: Key ) -> Self :: Value ;
83
83
84
84
fn hash_result ( hcx : & mut StableHashingContext < ' _ > , result : & Self :: Value )
85
85
-> Option < Fingerprint > ;
@@ -105,7 +105,7 @@ pub(crate) trait QueryDescription<'tcx>: QueryAccessors<'tcx> {
105
105
dep_kind : Self :: DEP_KIND ,
106
106
eval_always : Self :: EVAL_ALWAYS ,
107
107
name : Self :: NAME ,
108
- compute : Self :: compute ,
108
+ compute : Self :: COMPUTE_FN ,
109
109
hash_result : Self :: hash_result,
110
110
cache_on_disk : Self :: cache_on_disk,
111
111
try_load_from_disk : Self :: try_load_from_disk,
Original file line number Diff line number Diff line change @@ -1037,10 +1037,7 @@ macro_rules! define_queries_inner {
1037
1037
DepConstructor :: $node( tcx, * key)
1038
1038
}
1039
1039
1040
- #[ inline]
1041
- fn compute( tcx: TyCtxt <' tcx>, key: Self :: Key ) -> Self :: Value {
1042
- __query_compute:: $name( tcx, key)
1043
- }
1040
+ const COMPUTE_FN : fn ( TyCtxt <' tcx>, Self :: Key ) -> Self :: Value = __query_compute:: $name;
1044
1041
1045
1042
fn hash_result(
1046
1043
_hcx: & mut StableHashingContext <' _>,
You can’t perform that action at this time.
0 commit comments