@@ -9,7 +9,7 @@ use rustc_middle::mir::{
9
9
BasicBlock , Body , ClosureOutlivesSubject , ClosureRegionRequirements , LocalKind , Location ,
10
10
Promoted ,
11
11
} ;
12
- use rustc_middle:: ty:: { self , InstanceDef , RegionKind , RegionVid } ;
12
+ use rustc_middle:: ty:: { self , RegionKind , RegionVid } ;
13
13
use rustc_span:: symbol:: sym;
14
14
use std:: env;
15
15
use std:: fmt:: Debug ;
@@ -24,7 +24,6 @@ use polonius_engine::{Algorithm, Output};
24
24
use crate :: dataflow:: impls:: MaybeInitializedPlaces ;
25
25
use crate :: dataflow:: move_paths:: { InitKind , InitLocation , MoveData } ;
26
26
use crate :: dataflow:: ResultsCursor ;
27
- use crate :: transform:: MirSource ;
28
27
use crate :: util as mir_util;
29
28
use crate :: util:: pretty;
30
29
@@ -72,8 +71,7 @@ pub(in crate::borrow_check) fn replace_regions_in_mir<'cx, 'tcx>(
72
71
// Replace all remaining regions with fresh inference variables.
73
72
renumber:: renumber_mir ( infcx, body, promoted) ;
74
73
75
- let source = MirSource { instance : InstanceDef :: Item ( def. to_global ( ) ) , promoted : None } ;
76
- mir_util:: dump_mir ( infcx. tcx , None , "renumber" , & 0 , source, body, |_, _| Ok ( ( ) ) ) ;
74
+ mir_util:: dump_mir ( infcx. tcx , None , "renumber" , & 0 , body, |_, _| Ok ( ( ) ) ) ;
77
75
78
76
universal_regions
79
77
}
@@ -315,16 +313,15 @@ pub(in crate::borrow_check) fn compute_regions<'cx, 'tcx>(
315
313
316
314
pub ( super ) fn dump_mir_results < ' a , ' tcx > (
317
315
infcx : & InferCtxt < ' a , ' tcx > ,
318
- source : MirSource < ' tcx > ,
319
316
body : & Body < ' tcx > ,
320
317
regioncx : & RegionInferenceContext < ' tcx > ,
321
318
closure_region_requirements : & Option < ClosureRegionRequirements < ' _ > > ,
322
319
) {
323
- if !mir_util:: dump_enabled ( infcx. tcx , "nll" , source. def_id ( ) ) {
320
+ if !mir_util:: dump_enabled ( infcx. tcx , "nll" , body . source . def_id ( ) ) {
324
321
return ;
325
322
}
326
323
327
- mir_util:: dump_mir ( infcx. tcx , None , "nll" , & 0 , source , body, |pass_where, out| {
324
+ mir_util:: dump_mir ( infcx. tcx , None , "nll" , & 0 , body, |pass_where, out| {
328
325
match pass_where {
329
326
// Before the CFG, dump out the values for each region variable.
330
327
PassWhere :: BeforeCFG => {
@@ -352,14 +349,14 @@ pub(super) fn dump_mir_results<'a, 'tcx>(
352
349
// Also dump the inference graph constraints as a graphviz file.
353
350
let _: io:: Result < ( ) > = try {
354
351
let mut file =
355
- pretty:: create_dump_file ( infcx. tcx , "regioncx.all.dot" , None , "nll" , & 0 , source) ?;
352
+ pretty:: create_dump_file ( infcx. tcx , "regioncx.all.dot" , None , "nll" , & 0 , body . source ) ?;
356
353
regioncx. dump_graphviz_raw_constraints ( & mut file) ?;
357
354
} ;
358
355
359
356
// Also dump the inference graph constraints as a graphviz file.
360
357
let _: io:: Result < ( ) > = try {
361
358
let mut file =
362
- pretty:: create_dump_file ( infcx. tcx , "regioncx.scc.dot" , None , "nll" , & 0 , source) ?;
359
+ pretty:: create_dump_file ( infcx. tcx , "regioncx.scc.dot" , None , "nll" , & 0 , body . source ) ?;
363
360
regioncx. dump_graphviz_scc_constraints ( & mut file) ?;
364
361
} ;
365
362
}
0 commit comments