@@ -83,7 +83,7 @@ rustc_queries! {
8383 /// Avoid calling this query directly.
8484 query hir_module_items( key: LocalDefId ) -> & ' tcx rustc_middle:: hir:: ModuleItems {
8585 arena_cache
86- desc { |tcx| "getting HIR module items in `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
86+ desc { |tcx| "getting HIR module items in `{}`" , tcx. def_path_str( key) }
8787 cache_on_disk_if { true }
8888 }
8989
@@ -92,14 +92,14 @@ rustc_queries! {
9292 /// This can be conveniently accessed by methods on `tcx.hir()`.
9393 /// Avoid calling this query directly.
9494 query hir_owner( key: hir:: OwnerId ) -> Option <crate :: hir:: Owner <' tcx>> {
95- desc { |tcx| "getting HIR owner of `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
95+ desc { |tcx| "getting HIR owner of `{}`" , tcx. def_path_str( key) }
9696 }
9797
9898 /// Gives access to the HIR ID for the given `LocalDefId` owner `key` if any.
9999 ///
100100 /// Definitions that were generated with no HIR, would be fed to return `None`.
101101 query opt_local_def_id_to_hir_id( key: LocalDefId ) -> Option <hir:: HirId >{
102- desc { |tcx| "getting HIR ID of `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
102+ desc { |tcx| "getting HIR ID of `{}`" , tcx. def_path_str( key) }
103103 feedable
104104 }
105105
@@ -108,23 +108,23 @@ rustc_queries! {
108108 /// This can be conveniently accessed by methods on `tcx.hir()`.
109109 /// Avoid calling this query directly.
110110 query hir_owner_parent( key: hir:: OwnerId ) -> hir:: HirId {
111- desc { |tcx| "getting HIR parent of `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
111+ desc { |tcx| "getting HIR parent of `{}`" , tcx. def_path_str( key) }
112112 }
113113
114114 /// Gives access to the HIR nodes and bodies inside the HIR owner `key`.
115115 ///
116116 /// This can be conveniently accessed by methods on `tcx.hir()`.
117117 /// Avoid calling this query directly.
118118 query hir_owner_nodes( key: hir:: OwnerId ) -> hir:: MaybeOwner <& ' tcx hir:: OwnerNodes <' tcx>> {
119- desc { |tcx| "getting HIR owner items in `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
119+ desc { |tcx| "getting HIR owner items in `{}`" , tcx. def_path_str( key) }
120120 }
121121
122122 /// Gives access to the HIR attributes inside the HIR owner `key`.
123123 ///
124124 /// This can be conveniently accessed by methods on `tcx.hir()`.
125125 /// Avoid calling this query directly.
126126 query hir_attrs( key: hir:: OwnerId ) -> & ' tcx hir:: AttributeMap <' tcx> {
127- desc { |tcx| "getting HIR owner attributes in `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
127+ desc { |tcx| "getting HIR owner attributes in `{}`" , tcx. def_path_str( key) }
128128 }
129129
130130 /// Given the def_id of a const-generic parameter, computes the associated default const
@@ -295,7 +295,7 @@ rustc_queries! {
295295 query shallow_lint_levels_on( key: hir:: OwnerId ) -> & ' tcx rustc_middle:: lint:: ShallowLintLevelMap {
296296 eval_always // fetches `resolutions`
297297 arena_cache
298- desc { |tcx| "looking up lint levels for `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
298+ desc { |tcx| "looking up lint levels for `{}`" , tcx. def_path_str( key) }
299299 }
300300
301301 query lint_expectations( _: ( ) ) -> & ' tcx Vec <( LintExpectationId , LintExpectation ) > {
@@ -305,7 +305,7 @@ rustc_queries! {
305305
306306 query parent_module_from_def_id( key: LocalDefId ) -> LocalDefId {
307307 eval_always
308- desc { |tcx| "getting the parent module of `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
308+ desc { |tcx| "getting the parent module of `{}`" , tcx. def_path_str( key) }
309309 }
310310
311311 query expn_that_defined( key: DefId ) -> rustc_span:: ExpnId {
@@ -321,7 +321,7 @@ rustc_queries! {
321321
322322 /// Checks whether a type is representable or infinitely sized
323323 query representability( _: LocalDefId ) -> rustc_middle:: ty:: Representability {
324- desc { "checking if `{}` is representable" , tcx. def_path_str( key. to_def_id ( ) ) }
324+ desc { "checking if `{}` is representable" , tcx. def_path_str( key) }
325325 // infinitely sized types will cause a cycle
326326 cycle_delay_bug
327327 // we don't want recursive representability calls to be forced with
@@ -349,21 +349,21 @@ rustc_queries! {
349349 query thir_body( key: LocalDefId ) -> Result <( & ' tcx Steal <thir:: Thir <' tcx>>, thir:: ExprId ) , ErrorGuaranteed > {
350350 // Perf tests revealed that hashing THIR is inefficient (see #85729).
351351 no_hash
352- desc { |tcx| "building THIR for `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
352+ desc { |tcx| "building THIR for `{}`" , tcx. def_path_str( key) }
353353 }
354354
355355 /// Create a THIR tree for debugging.
356356 query thir_tree( key: LocalDefId ) -> & ' tcx String {
357357 no_hash
358358 arena_cache
359- desc { |tcx| "constructing THIR tree for `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
359+ desc { |tcx| "constructing THIR tree for `{}`" , tcx. def_path_str( key) }
360360 }
361361
362362 /// Create a list-like THIR representation for debugging.
363363 query thir_flat( key: LocalDefId ) -> & ' tcx String {
364364 no_hash
365365 arena_cache
366- desc { |tcx| "constructing flat THIR representation for `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
366+ desc { |tcx| "constructing flat THIR representation for `{}`" , tcx. def_path_str( key) }
367367 }
368368
369369 /// Set of all the `DefId`s in this crate that have MIR associated with
@@ -386,15 +386,15 @@ rustc_queries! {
386386 /// Fetch the MIR for a given `DefId` right after it's built - this includes
387387 /// unreachable code.
388388 query mir_built( key: LocalDefId ) -> & ' tcx Steal <mir:: Body <' tcx>> {
389- desc { |tcx| "building MIR for `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
389+ desc { |tcx| "building MIR for `{}`" , tcx. def_path_str( key) }
390390 }
391391
392392 /// Fetch the MIR for a given `DefId` up till the point where it is
393393 /// ready for const qualification.
394394 ///
395395 /// See the README for the `mir` module for details.
396396 query mir_const( key: LocalDefId ) -> & ' tcx Steal <mir:: Body <' tcx>> {
397- desc { |tcx| "preparing `{}` for borrow checking" , tcx. def_path_str( key. to_def_id ( ) ) }
397+ desc { |tcx| "preparing `{}` for borrow checking" , tcx. def_path_str( key) }
398398 no_hash
399399 }
400400
@@ -410,7 +410,7 @@ rustc_queries! {
410410
411411 query mir_drops_elaborated_and_const_checked( key: LocalDefId ) -> & ' tcx Steal <mir:: Body <' tcx>> {
412412 no_hash
413- desc { |tcx| "elaborating drops for `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
413+ desc { |tcx| "elaborating drops for `{}`" , tcx. def_path_str( key) }
414414 }
415415
416416 query mir_for_ctfe(
@@ -426,13 +426,13 @@ rustc_queries! {
426426 & ' tcx Steal <IndexVec <mir:: Promoted , mir:: Body <' tcx>>>
427427 ) {
428428 no_hash
429- desc { |tcx| "promoting constants in MIR for `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
429+ desc { |tcx| "promoting constants in MIR for `{}`" , tcx. def_path_str( key) }
430430 }
431431
432432 query closure_typeinfo( key: LocalDefId ) -> ty:: ClosureTypeInfo <' tcx> {
433433 desc {
434434 |tcx| "finding symbols for captures of closure `{}`" ,
435- tcx. def_path_str( key. to_def_id ( ) )
435+ tcx. def_path_str( key)
436436 }
437437 }
438438
@@ -444,7 +444,7 @@ rustc_queries! {
444444 }
445445
446446 query check_generator_obligations( key: LocalDefId ) {
447- desc { |tcx| "verify auto trait bounds for generator interior type `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
447+ desc { |tcx| "verify auto trait bounds for generator interior type `{}`" , tcx. def_path_str( key) }
448448 }
449449
450450 /// MIR after our optimization passes have run. This is MIR that is ready
@@ -526,7 +526,7 @@ rustc_queries! {
526526 /// `explicit_predicates_of` and `explicit_item_bounds` will then take
527527 /// the appropriate subsets of the predicates here.
528528 query trait_explicit_predicates_and_bounds( key: LocalDefId ) -> ty:: GenericPredicates <' tcx> {
529- desc { |tcx| "computing explicit predicates of trait `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
529+ desc { |tcx| "computing explicit predicates of trait `{}`" , tcx. def_path_str( key) }
530530 }
531531
532532 /// Returns the predicates written explicitly by the user.
@@ -768,14 +768,14 @@ rustc_queries! {
768768
769769 /// The result of unsafety-checking this `LocalDefId`.
770770 query unsafety_check_result( key: LocalDefId ) -> & ' tcx mir:: UnsafetyCheckResult {
771- desc { |tcx| "unsafety-checking `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
771+ desc { |tcx| "unsafety-checking `{}`" , tcx. def_path_str( key) }
772772 cache_on_disk_if { true }
773773 }
774774
775775 /// Unsafety-check this `LocalDefId` with THIR unsafeck. This should be
776776 /// used with `-Zthir-unsafeck`.
777777 query thir_check_unsafety( key: LocalDefId ) {
778- desc { |tcx| "unsafety-checking `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
778+ desc { |tcx| "unsafety-checking `{}`" , tcx. def_path_str( key) }
779779 cache_on_disk_if { true }
780780 }
781781
@@ -872,16 +872,16 @@ rustc_queries! {
872872 }
873873
874874 query typeck( key: LocalDefId ) -> & ' tcx ty:: TypeckResults <' tcx> {
875- desc { |tcx| "type-checking `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
875+ desc { |tcx| "type-checking `{}`" , tcx. def_path_str( key) }
876876 cache_on_disk_if { true }
877877 }
878878 query diagnostic_only_typeck( key: LocalDefId ) -> & ' tcx ty:: TypeckResults <' tcx> {
879- desc { |tcx| "type-checking `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
879+ desc { |tcx| "type-checking `{}`" , tcx. def_path_str( key) }
880880 cache_on_disk_if { true }
881881 }
882882
883883 query used_trait_imports( key: LocalDefId ) -> & ' tcx UnordSet <LocalDefId > {
884- desc { |tcx| "finding used_trait_imports `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
884+ desc { |tcx| "finding used_trait_imports `{}`" , tcx. def_path_str( key) }
885885 cache_on_disk_if { true }
886886 }
887887
@@ -896,7 +896,7 @@ rustc_queries! {
896896 /// Borrow-checks the function body. If this is a closure, returns
897897 /// additional requirements that the closure's creator must verify.
898898 query mir_borrowck( key: LocalDefId ) -> & ' tcx mir:: BorrowCheckResult <' tcx> {
899- desc { |tcx| "borrow-checking `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
899+ desc { |tcx| "borrow-checking `{}`" , tcx. def_path_str( key) }
900900 cache_on_disk_if( tcx) { tcx. is_typeck_child( key. to_def_id( ) ) }
901901 }
902902
@@ -918,7 +918,7 @@ rustc_queries! {
918918 query orphan_check_impl( key: LocalDefId ) -> Result <( ) , ErrorGuaranteed > {
919919 desc { |tcx|
920920 "checking whether impl `{}` follows the orphan rules" ,
921- tcx. def_path_str( key. to_def_id ( ) ) ,
921+ tcx. def_path_str( key) ,
922922 }
923923 }
924924
@@ -930,7 +930,7 @@ rustc_queries! {
930930 desc { |tcx|
931931 "computing if `{}` (transitively) calls `{}`" ,
932932 key. 0 ,
933- tcx. def_path_str( key. 1 . to_def_id ( ) ) ,
933+ tcx. def_path_str( key. 1 ) ,
934934 }
935935 }
936936
@@ -1368,7 +1368,7 @@ rustc_queries! {
13681368 separate_provide_extern
13691369 }
13701370 query has_ffi_unwind_calls( key: LocalDefId ) -> bool {
1371- desc { |tcx| "checking if `{}` contains FFI-unwind calls" , tcx. def_path_str( key. to_def_id ( ) ) }
1371+ desc { |tcx| "checking if `{}` contains FFI-unwind calls" , tcx. def_path_str( key) }
13721372 cache_on_disk_if { true }
13731373 }
13741374 query required_panic_strategy( _: CrateNum ) -> Option <PanicStrategy > {
@@ -1414,7 +1414,7 @@ rustc_queries! {
14141414 }
14151415
14161416 query check_well_formed( key: hir:: OwnerId ) -> ( ) {
1417- desc { |tcx| "checking that `{}` is well-formed" , tcx. def_path_str( key. to_def_id ( ) ) }
1417+ desc { |tcx| "checking that `{}` is well-formed" , tcx. def_path_str( key) }
14181418 }
14191419
14201420 // The `DefId`s of all non-generic functions and statics in the given crate
@@ -1443,7 +1443,7 @@ rustc_queries! {
14431443 query is_unreachable_local_definition( def_id: LocalDefId ) -> bool {
14441444 desc { |tcx|
14451445 "checking whether `{}` is reachable from outside the crate" ,
1446- tcx. def_path_str( def_id. to_def_id ( ) ) ,
1446+ tcx. def_path_str( def_id) ,
14471447 }
14481448 }
14491449
@@ -1637,7 +1637,7 @@ rustc_queries! {
16371637 separate_provide_extern
16381638 }
16391639 query extern_mod_stmt_cnum( def_id: LocalDefId ) -> Option <CrateNum > {
1640- desc { |tcx| "computing crate imported by `{}`" , tcx. def_path_str( def_id. to_def_id ( ) ) }
1640+ desc { |tcx| "computing crate imported by `{}`" , tcx. def_path_str( def_id) }
16411641 }
16421642
16431643 query lib_features( _: ( ) ) -> & ' tcx LibFeatures {
@@ -1741,7 +1741,7 @@ rustc_queries! {
17411741 desc { "fetching potentially unused trait imports" }
17421742 }
17431743 query names_imported_by_glob_use( def_id: LocalDefId ) -> & ' tcx UnordSet <Symbol > {
1744- desc { |tcx| "finding names imported by glob use for `{}`" , tcx. def_path_str( def_id. to_def_id ( ) ) }
1744+ desc { |tcx| "finding names imported by glob use for `{}`" , tcx. def_path_str( def_id) }
17451745 }
17461746
17471747 query stability_index( _: ( ) ) -> & ' tcx stability:: Index {
@@ -2064,7 +2064,7 @@ rustc_queries! {
20642064 query compare_impl_const(
20652065 key: ( LocalDefId , DefId )
20662066 ) -> Result <( ) , ErrorGuaranteed > {
2067- desc { |tcx| "checking assoc const `{}` has the same type as trait item" , tcx. def_path_str( key. 0 . to_def_id ( ) ) }
2067+ desc { |tcx| "checking assoc const `{}` has the same type as trait item" , tcx. def_path_str( key. 0 ) }
20682068 }
20692069
20702070 query deduced_param_attrs( def_id: DefId ) -> & ' tcx [ ty:: DeducedParamAttrs ] {
0 commit comments