@@ -244,7 +244,6 @@ pub enum ExtraConstraintInfo {
244244 PlaceholderFromPredicate ( Span ) ,
245245}
246246
247- #[ cfg( debug_assertions) ]
248247#[ instrument( skip( infcx, sccs) , level = "debug" ) ]
249248fn sccs_info < ' cx , ' tcx > (
250249 infcx : & ' cx BorrowckInferCtxt < ' cx , ' tcx > ,
@@ -271,10 +270,10 @@ fn sccs_info<'cx, 'tcx>(
271270 components[ scc_idx. as_usize ( ) ] . insert ( ( reg_var, * origin) ) ;
272271 }
273272
274- let mut components_str = "strongly connected components:" ;
273+ let mut components_str = "strongly connected components:" . to_string ( ) ;
275274 for ( scc_idx, reg_vars_origins) in components. iter ( ) . enumerate ( ) {
276275 let regions_info = reg_vars_origins. clone ( ) . into_iter ( ) . collect :: < Vec < _ > > ( ) ;
277- components_str. push ( & format (
276+ components_str. push_str ( & format ! (
278277 "{:?}: {:?})" ,
279278 ConstraintSccIndex :: from_usize( scc_idx) ,
280279 regions_info,
@@ -346,8 +345,9 @@ impl<'tcx> RegionInferenceContext<'tcx> {
346345 let fr_static = universal_regions. fr_static ;
347346 let constraint_sccs = Rc :: new ( constraints. compute_sccs ( & constraint_graph, fr_static) ) ;
348347
349- #[ cfg( debug_assertions) ]
350- sccs_info ( _infcx, constraint_sccs. clone ( ) ) ;
348+ if cfg ! ( debug_assertions) {
349+ sccs_info ( _infcx, constraint_sccs. clone ( ) ) ;
350+ }
351351
352352 let mut scc_values =
353353 RegionValues :: new ( elements, universal_regions. len ( ) , & placeholder_indices) ;
0 commit comments