@@ -316,7 +316,7 @@ where
316316 OnHit : FnOnce ( & C :: Stored ) -> R ,
317317{
318318 cache. lookup ( & key, |value, index| {
319- if unlikely ! ( tcx. profiler( ) . enabled( ) ) {
319+ if std :: intrinsics :: unlikely ( tcx. profiler ( ) . enabled ( ) ) {
320320 tcx. profiler ( ) . query_cache_hit ( index. into ( ) ) ;
321321 }
322322 tcx. dep_graph ( ) . read_index ( index) ;
@@ -354,7 +354,7 @@ where
354354 . lookup ( & key, |value, index| ( value. clone ( ) , index) )
355355 . unwrap_or_else ( |_| panic ! ( "value must be in cache after waiting" ) ) ;
356356
357- if unlikely ! ( tcx. dep_context( ) . profiler( ) . enabled( ) ) {
357+ if std :: intrinsics :: unlikely ( tcx. dep_context ( ) . profiler ( ) . enabled ( ) ) {
358358 tcx. dep_context ( ) . profiler ( ) . query_cache_hit ( index. into ( ) ) ;
359359 }
360360 query_blocked_prof_timer. finish_with_query_invocation_id ( index. into ( ) ) ;
@@ -422,7 +422,7 @@ where
422422 let diagnostics = diagnostics. into_inner ( ) ;
423423 let side_effects = QuerySideEffects { diagnostics } ;
424424
425- if unlikely ! ( !side_effects. is_empty( ) ) {
425+ if std :: intrinsics :: unlikely ( !side_effects. is_empty ( ) ) {
426426 if query. anon {
427427 tcx. store_side_effects_for_anon_node ( dep_node_index, side_effects) ;
428428 } else {
@@ -466,7 +466,9 @@ where
466466 prof_timer. finish_with_query_invocation_id ( dep_node_index. into ( ) ) ;
467467
468468 if let Some ( result) = result {
469- if unlikely ! ( tcx. dep_context( ) . sess( ) . opts. debugging_opts. query_dep_graph) {
469+ if std:: intrinsics:: unlikely (
470+ tcx. dep_context ( ) . sess ( ) . opts . debugging_opts . query_dep_graph ,
471+ ) {
470472 dep_graph. mark_debug_loaded_from_disk ( * dep_node)
471473 }
472474
@@ -483,8 +485,8 @@ where
483485 // currently afford to verify every hash. This subset should still
484486 // give us some coverage of potential bugs though.
485487 let try_verify = prev_fingerprint. as_value ( ) . 1 % 32 == 0 ;
486- if unlikely ! (
487- try_verify || tcx. dep_context( ) . sess( ) . opts. debugging_opts. incremental_verify_ich
488+ if std :: intrinsics :: unlikely (
489+ try_verify || tcx. dep_context ( ) . sess ( ) . opts . debugging_opts . incremental_verify_ich ,
488490 ) {
489491 incremental_verify_ich ( * tcx. dep_context ( ) , & result, dep_node, query) ;
490492 }
@@ -723,7 +725,7 @@ where
723725 // Ensure that only one of them runs the query.
724726 let cache = Q :: query_cache ( tcx) ;
725727 let cached = cache. lookup ( & key, |_, index| {
726- if unlikely ! ( tcx. dep_context( ) . profiler( ) . enabled( ) ) {
728+ if std :: intrinsics :: unlikely ( tcx. dep_context ( ) . profiler ( ) . enabled ( ) ) {
727729 tcx. dep_context ( ) . profiler ( ) . query_cache_hit ( index. into ( ) ) ;
728730 }
729731 } ) ;
0 commit comments