@@ -916,37 +916,6 @@ macro_rules! define_queries_inner {
916
916
input: ( $( ( [ $( $modifiers) * ] [ $( $attr) * ] [ $name] ) ) * )
917
917
}
918
918
919
- impl <$tcx> Queries <$tcx> {
920
- pub fn new(
921
- providers: IndexVec <CrateNum , Providers <$tcx>>,
922
- fallback_extern_providers: Providers <$tcx>,
923
- on_disk_cache: OnDiskCache <' tcx>,
924
- ) -> Self {
925
- Queries {
926
- providers,
927
- fallback_extern_providers: Box :: new( fallback_extern_providers) ,
928
- on_disk_cache,
929
- $( $name: Default :: default ( ) ) ,*
930
- }
931
- }
932
-
933
- pub fn try_collect_active_jobs(
934
- & self
935
- ) -> Option <FxHashMap <QueryJobId , QueryJobInfo <' tcx>>> {
936
- let mut jobs = FxHashMap :: default ( ) ;
937
-
938
- $(
939
- self . $name. try_collect_active_jobs(
940
- <queries:: $name<' tcx> as QueryAccessors <' tcx>>:: DEP_KIND ,
941
- Query :: $name,
942
- & mut jobs,
943
- ) ?;
944
- ) *
945
-
946
- Some ( jobs)
947
- }
948
- }
949
-
950
919
#[ allow( nonstandard_style) ]
951
920
#[ derive( Clone , Debug ) ]
952
921
pub enum Query <$tcx> {
@@ -1188,6 +1157,37 @@ macro_rules! define_queries_struct {
1188
1157
1189
1158
$( $( #[ $attr] ) * $name: QueryState <$tcx, queries:: $name<$tcx>>, ) *
1190
1159
}
1160
+
1161
+ impl <$tcx> Queries <$tcx> {
1162
+ pub fn new(
1163
+ providers: IndexVec <CrateNum , Providers <$tcx>>,
1164
+ fallback_extern_providers: Providers <$tcx>,
1165
+ on_disk_cache: OnDiskCache <' tcx>,
1166
+ ) -> Self {
1167
+ Queries {
1168
+ providers,
1169
+ fallback_extern_providers: Box :: new( fallback_extern_providers) ,
1170
+ on_disk_cache,
1171
+ $( $name: Default :: default ( ) ) ,*
1172
+ }
1173
+ }
1174
+
1175
+ pub fn try_collect_active_jobs(
1176
+ & self
1177
+ ) -> Option <FxHashMap <QueryJobId , QueryJobInfo <' tcx>>> {
1178
+ let mut jobs = FxHashMap :: default ( ) ;
1179
+
1180
+ $(
1181
+ self . $name. try_collect_active_jobs(
1182
+ <queries:: $name<' tcx> as QueryAccessors <' tcx>>:: DEP_KIND ,
1183
+ Query :: $name,
1184
+ & mut jobs,
1185
+ ) ?;
1186
+ ) *
1187
+
1188
+ Some ( jobs)
1189
+ }
1190
+ }
1191
1191
} ;
1192
1192
}
1193
1193
0 commit comments