@@ -209,11 +209,11 @@ rustc_queries! {
209
209
cache_on_disk_if { key. is_local( ) }
210
210
}
211
211
query mir_const_qualif_const_arg(
212
- key: ty :: WithOptParam < LocalDefId >
212
+ key: ( LocalDefId , DefId )
213
213
) -> mir:: ConstQualifs {
214
214
desc {
215
- |tcx| "const checking the potential const argument `{}`" ,
216
- tcx. def_path_str( key. did . to_def_id( ) )
215
+ |tcx| "const checking the const argument `{}`" ,
216
+ tcx. def_path_str( key. 0 . to_def_id( ) )
217
217
}
218
218
}
219
219
@@ -257,10 +257,10 @@ rustc_queries! {
257
257
desc { |tcx| "optimizing MIR for `{}`" , tcx. def_path_str( key) }
258
258
cache_on_disk_if { key. is_local( ) }
259
259
}
260
- query optimized_mir_of_const_arg( key: ty :: WithOptParam < LocalDefId > ) -> & ' tcx mir:: Body <' tcx> {
260
+ query optimized_mir_of_const_arg( key: ( LocalDefId , DefId ) ) -> & ' tcx mir:: Body <' tcx> {
261
261
desc {
262
- |tcx| "optimizing MIR for the potential const argument `{}`" ,
263
- tcx. def_path_str( key. did . to_def_id( ) )
262
+ |tcx| "optimizing MIR for the const argument `{}`" ,
263
+ tcx. def_path_str( key. 0 . to_def_id( ) )
264
264
}
265
265
}
266
266
@@ -280,7 +280,7 @@ rustc_queries! {
280
280
key: ty:: WithOptParam <LocalDefId >
281
281
) -> & ' tcx IndexVec <mir:: Promoted , mir:: Body <' tcx>> {
282
282
desc {
283
- |tcx| "optimizing promoted MIR for the potential const argument `{}`" ,
283
+ |tcx| "optimizing promoted MIR for the const argument `{}`" ,
284
284
tcx. def_path_str( key. did. to_def_id( ) ) ,
285
285
}
286
286
}
@@ -496,8 +496,8 @@ rustc_queries! {
496
496
desc { |tcx| "unsafety-checking `{}`" , tcx. def_path_str( key. to_def_id( ) ) }
497
497
cache_on_disk_if { true }
498
498
}
499
- query unsafety_check_result_const_arg( key: ty :: WithOptParam < LocalDefId > ) -> & ' tcx mir:: UnsafetyCheckResult {
500
- desc { |tcx| "unsafety-checking the potential const arg `{}`" , tcx. def_path_str( key. did . to_def_id( ) ) }
499
+ query unsafety_check_result_const_arg( key: ( LocalDefId , DefId ) ) -> & ' tcx mir:: UnsafetyCheckResult {
500
+ desc { |tcx| "unsafety-checking the const arg `{}`" , tcx. def_path_str( key. 0 . to_def_id( ) ) }
501
501
}
502
502
503
503
/// HACK: when evaluated, this reports a "unsafe derive on repr(packed)" error.
@@ -579,12 +579,12 @@ rustc_queries! {
579
579
desc { |tcx| "type-checking `{}`" , tcx. def_path_str( key. to_def_id( ) ) }
580
580
cache_on_disk_if { true }
581
581
}
582
- query _typeck_tables_of_const_arg (
583
- key: ty :: WithOptParam < LocalDefId >
582
+ query typeck_tables_of_const_arg (
583
+ key: ( LocalDefId , DefId )
584
584
) -> & ' tcx ty:: TypeckTables <' tcx> {
585
585
desc {
586
586
|tcx| "type-checking the const argument `{}`" ,
587
- tcx. def_path_str( key. did . to_def_id( ) ) ,
587
+ tcx. def_path_str( key. 0 . to_def_id( ) ) ,
588
588
}
589
589
}
590
590
query diagnostic_only_typeck_tables_of( key: LocalDefId ) -> & ' tcx ty:: TypeckTables <' tcx> {
@@ -627,10 +627,10 @@ rustc_queries! {
627
627
|| opt_result. map_or( false , |r| !r. concrete_opaque_types. is_empty( ) )
628
628
}
629
629
}
630
- query mir_borrowck_const_arg( key: ty :: WithOptParam < LocalDefId > ) -> & ' tcx mir:: BorrowCheckResult <' tcx> {
630
+ query mir_borrowck_const_arg( key: ( LocalDefId , DefId ) ) -> & ' tcx mir:: BorrowCheckResult <' tcx> {
631
631
desc {
632
- |tcx| "borrow-checking the potential const argument`{}`" ,
633
- tcx. def_path_str( key. did . to_def_id( ) )
632
+ |tcx| "borrow-checking the const argument`{}`" ,
633
+ tcx. def_path_str( key. 0 . to_def_id( ) )
634
634
}
635
635
}
636
636
}
@@ -1501,11 +1501,11 @@ rustc_queries! {
1501
1501
}
1502
1502
1503
1503
query resolve_instance_of_const_arg(
1504
- key: ty:: ParamEnvAnd <' tcx, ( ty :: WithOptParam < DefId > , SubstsRef <' tcx>) >
1504
+ key: ty:: ParamEnvAnd <' tcx, ( LocalDefId , DefId , SubstsRef <' tcx>) >
1505
1505
) -> Result <Option <ty:: Instance <' tcx>>, ErrorReported > {
1506
1506
desc {
1507
- "resolving instance of the potential const argument `{}`" ,
1508
- ty:: Instance :: new( key. value. 0 . did , key. value. 1 ) ,
1507
+ "resolving instance of the const argument `{}`" ,
1508
+ ty:: Instance :: new( key. value. 0 . to_def_id ( ) , key. value. 2 ) ,
1509
1509
}
1510
1510
}
1511
1511
}
0 commit comments