@@ -4,6 +4,7 @@ use rustc_data_structures::vec_map::VecMap;
44use rustc_errors:: Diagnostic ;
55use rustc_index:: vec:: IndexVec ;
66use rustc_infer:: infer:: InferCtxt ;
7+ use rustc_middle:: mir:: { create_dump_file, dump_enabled, dump_mir, PassWhere } ;
78use rustc_middle:: mir:: {
89 BasicBlock , Body , ClosureOutlivesSubject , ClosureRegionRequirements , LocalKind , Location ,
910 Promoted ,
@@ -17,14 +18,11 @@ use std::path::PathBuf;
1718use std:: rc:: Rc ;
1819use std:: str:: FromStr ;
1920
20- use self :: mir_util:: PassWhere ;
2121use polonius_engine:: { Algorithm , Output } ;
2222
23- use rustc_mir:: dataflow:: impls:: MaybeInitializedPlaces ;
24- use rustc_mir:: dataflow:: move_paths:: { InitKind , InitLocation , MoveData } ;
25- use rustc_mir:: dataflow:: ResultsCursor ;
26- use rustc_mir:: util as mir_util;
27- use rustc_mir:: util:: pretty;
23+ use rustc_mir_dataflow:: impls:: MaybeInitializedPlaces ;
24+ use rustc_mir_dataflow:: move_paths:: { InitKind , InitLocation , MoveData } ;
25+ use rustc_mir_dataflow:: ResultsCursor ;
2826
2927use crate :: {
3028 borrow_set:: BorrowSet ,
@@ -72,7 +70,7 @@ pub(crate) fn replace_regions_in_mir<'cx, 'tcx>(
7270 // Replace all remaining regions with fresh inference variables.
7371 renumber:: renumber_mir ( infcx, body, promoted) ;
7472
75- mir_util :: dump_mir ( infcx. tcx , None , "renumber" , & 0 , body, |_, _| Ok ( ( ) ) ) ;
73+ dump_mir ( infcx. tcx , None , "renumber" , & 0 , body, |_, _| Ok ( ( ) ) ) ;
7674
7775 universal_regions
7876}
@@ -322,11 +320,11 @@ pub(super) fn dump_mir_results<'a, 'tcx>(
322320 regioncx : & RegionInferenceContext < ' tcx > ,
323321 closure_region_requirements : & Option < ClosureRegionRequirements < ' _ > > ,
324322) {
325- if !mir_util :: dump_enabled ( infcx. tcx , "nll" , body. source . def_id ( ) ) {
323+ if !dump_enabled ( infcx. tcx , "nll" , body. source . def_id ( ) ) {
326324 return ;
327325 }
328326
329- mir_util :: dump_mir ( infcx. tcx , None , "nll" , & 0 , body, |pass_where, out| {
327+ dump_mir ( infcx. tcx , None , "nll" , & 0 , body, |pass_where, out| {
330328 match pass_where {
331329 // Before the CFG, dump out the values for each region variable.
332330 PassWhere :: BeforeCFG => {
@@ -354,14 +352,14 @@ pub(super) fn dump_mir_results<'a, 'tcx>(
354352 // Also dump the inference graph constraints as a graphviz file.
355353 let _: io:: Result < ( ) > = try {
356354 let mut file =
357- pretty :: create_dump_file ( infcx. tcx , "regioncx.all.dot" , None , "nll" , & 0 , body. source ) ?;
355+ create_dump_file ( infcx. tcx , "regioncx.all.dot" , None , "nll" , & 0 , body. source ) ?;
358356 regioncx. dump_graphviz_raw_constraints ( & mut file) ?;
359357 } ;
360358
361359 // Also dump the inference graph constraints as a graphviz file.
362360 let _: io:: Result < ( ) > = try {
363361 let mut file =
364- pretty :: create_dump_file ( infcx. tcx , "regioncx.scc.dot" , None , "nll" , & 0 , body. source ) ?;
362+ create_dump_file ( infcx. tcx , "regioncx.scc.dot" , None , "nll" , & 0 , body. source ) ?;
365363 regioncx. dump_graphviz_scc_constraints ( & mut file) ?;
366364 } ;
367365}
0 commit comments