@@ -7,6 +7,7 @@ use rustc_ast_pretty::pprust as pprust_ast;
7
7
use rustc_middle:: bug;
8
8
use rustc_middle:: mir:: { write_mir_graphviz, write_mir_pretty} ;
9
9
use rustc_middle:: ty:: { self , TyCtxt } ;
10
+ use rustc_mir_build:: thir:: print:: { thir_flat, thir_tree} ;
10
11
use rustc_session:: Session ;
11
12
use rustc_session:: config:: { OutFileName , PpHirMode , PpMode , PpSourceMode } ;
12
13
use rustc_smir:: rustc_internal:: pretty:: write_smir_pretty;
@@ -313,7 +314,7 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
313
314
tcx. dcx ( ) . abort_if_errors ( ) ;
314
315
debug ! ( "pretty printing THIR tree" ) ;
315
316
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) ) ;
317
318
}
318
319
out
319
320
}
@@ -324,7 +325,7 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
324
325
tcx. dcx ( ) . abort_if_errors ( ) ;
325
326
debug ! ( "pretty printing THIR flat" ) ;
326
327
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) ) ;
328
329
}
329
330
out
330
331
}
0 commit comments