@@ -4,6 +4,7 @@ use rustc_data_structures::vec_map::VecMap;
4
4
use rustc_errors:: Diagnostic ;
5
5
use rustc_index:: vec:: IndexVec ;
6
6
use rustc_infer:: infer:: InferCtxt ;
7
+ use rustc_middle:: mir:: { create_dump_file, dump_enabled, dump_mir, PassWhere } ;
7
8
use rustc_middle:: mir:: {
8
9
BasicBlock , Body , ClosureOutlivesSubject , ClosureRegionRequirements , LocalKind , Location ,
9
10
Promoted ,
@@ -17,14 +18,11 @@ use std::path::PathBuf;
17
18
use std:: rc:: Rc ;
18
19
use std:: str:: FromStr ;
19
20
20
- use self :: mir_util:: PassWhere ;
21
21
use polonius_engine:: { Algorithm , Output } ;
22
22
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 ;
28
26
29
27
use crate :: {
30
28
borrow_set:: BorrowSet ,
@@ -72,7 +70,7 @@ pub(crate) fn replace_regions_in_mir<'cx, 'tcx>(
72
70
// Replace all remaining regions with fresh inference variables.
73
71
renumber:: renumber_mir ( infcx, body, promoted) ;
74
72
75
- mir_util :: dump_mir ( infcx. tcx , None , "renumber" , & 0 , body, |_, _| Ok ( ( ) ) ) ;
73
+ dump_mir ( infcx. tcx , None , "renumber" , & 0 , body, |_, _| Ok ( ( ) ) ) ;
76
74
77
75
universal_regions
78
76
}
@@ -322,11 +320,11 @@ pub(super) fn dump_mir_results<'a, 'tcx>(
322
320
regioncx : & RegionInferenceContext < ' tcx > ,
323
321
closure_region_requirements : & Option < ClosureRegionRequirements < ' _ > > ,
324
322
) {
325
- if !mir_util :: dump_enabled ( infcx. tcx , "nll" , body. source . def_id ( ) ) {
323
+ if !dump_enabled ( infcx. tcx , "nll" , body. source . def_id ( ) ) {
326
324
return ;
327
325
}
328
326
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| {
330
328
match pass_where {
331
329
// Before the CFG, dump out the values for each region variable.
332
330
PassWhere :: BeforeCFG => {
@@ -354,14 +352,14 @@ pub(super) fn dump_mir_results<'a, 'tcx>(
354
352
// Also dump the inference graph constraints as a graphviz file.
355
353
let _: io:: Result < ( ) > = try {
356
354
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 ) ?;
358
356
regioncx. dump_graphviz_raw_constraints ( & mut file) ?;
359
357
} ;
360
358
361
359
// Also dump the inference graph constraints as a graphviz file.
362
360
let _: io:: Result < ( ) > = try {
363
361
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 ) ?;
365
363
regioncx. dump_graphviz_scc_constraints ( & mut file) ?;
366
364
} ;
367
365
}
0 commit comments