File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -563,7 +563,7 @@ pub fn lower_to_hir(tcx: TyCtxt<'_>, (): ()) -> mid_hir::Crate<'_> {
563563
564564 // Don't hash unless necessary, because it's expensive.
565565 let opt_hir_hash =
566- if tcx. needs_crate_hash ( ) { Some ( compute_hir_hash ( tcx, & owners) ) } else { None } ;
566+ if tcx. needs_hir_hash ( ) { Some ( compute_hir_hash ( tcx, & owners) ) } else { None } ;
567567
568568 let delayed_resolver = Steal :: new ( ( resolver, krate) ) ;
569569 mid_hir:: Crate :: new ( owners, delayed_ids, delayed_resolver, opt_hir_hash)
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ impl<'tcx> TyCtxt<'tcx> {
237237 attrs : & SortedMap < ItemLocalId , & [ Attribute ] > ,
238238 define_opaque : Option < & [ ( Span , LocalDefId ) ] > ,
239239 ) -> Hashes {
240- if !self . needs_crate_hash ( ) {
240+ if !self . needs_hir_hash ( ) {
241241 return Hashes { opt_hash_including_bodies : None , attrs_hash : None } ;
242242 }
243243
Original file line number Diff line number Diff line change @@ -1136,12 +1136,12 @@ impl<'tcx> TyCtxt<'tcx> {
11361136 } )
11371137 }
11381138
1139- pub fn needs_crate_hash ( self ) -> bool {
1140- // Why is the crate hash needed for these configurations?
1139+ pub fn needs_hir_hash ( self ) -> bool {
1140+ // Why is the hir hash needed for these configurations?
11411141 // - debug_assertions: for the "fingerprint the result" check in
11421142 // `rustc_query_impl::execution::execute_job`.
11431143 // - incremental: for query lookups.
1144- // - needs_metadata: for putting into crate metadata.
1144+ // - needs_metadata: it is included in the crate metadata through the crate_hash query
11451145 // - instrument_coverage: for putting into coverage data (see
11461146 // `hash_mir_source`).
11471147 // - metrics_dir: metrics use the strict version hash in the filenames
You can’t perform that action at this time.
0 commit comments