@@ -7,6 +7,7 @@ use rustc_ast_pretty::pprust as pprust_ast;
77use rustc_middle:: bug;
88use rustc_middle:: mir:: { write_mir_graphviz, write_mir_pretty} ;
99use rustc_middle:: ty:: { self , TyCtxt } ;
10+ use rustc_mir_build:: thir:: print:: { thir_flat, thir_tree} ;
1011use rustc_session:: Session ;
1112use rustc_session:: config:: { OutFileName , PpHirMode , PpMode , PpSourceMode } ;
1213use rustc_smir:: rustc_internal:: pretty:: write_smir_pretty;
@@ -313,7 +314,7 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
313314 tcx. dcx ( ) . abort_if_errors ( ) ;
314315 debug ! ( "pretty printing THIR tree" ) ;
315316 for did in tcx. hir ( ) . body_owners ( ) {
316- let _ = writeln ! ( out, "{:?}:\n {}\n " , did, tcx . thir_tree( did) ) ;
317+ let _ = writeln ! ( out, "{:?}:\n {}\n " , did, thir_tree( tcx , did) ) ;
317318 }
318319 out
319320 }
@@ -324,7 +325,7 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
324325 tcx. dcx ( ) . abort_if_errors ( ) ;
325326 debug ! ( "pretty printing THIR flat" ) ;
326327 for did in tcx. hir ( ) . body_owners ( ) {
327- let _ = writeln ! ( out, "{:?}:\n {}\n " , did, tcx . thir_flat( did) ) ;
328+ let _ = writeln ! ( out, "{:?}:\n {}\n " , did, thir_flat( tcx , did) ) ;
328329 }
329330 out
330331 }
0 commit comments