Skip to content

Commit ea19216

Browse files
committed
rename and document NLL MIR dump entry point
1 parent 760f80c commit ea19216

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

compiler/rustc_borrowck/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ fn do_mir_borrowck<'tcx>(
229229

230230
// Dump MIR results into a file, if that is enabled. This let us
231231
// write unit-tests, as well as helping with debugging.
232-
nll::dump_mir_results(&infcx, body, &regioncx, &opt_closure_req);
232+
nll::dump_nll_mir(&infcx, body, &regioncx, &opt_closure_req);
233233

234234
// We also have a `#[rustc_regions]` annotation that causes us to dump
235235
// information.

compiler/rustc_borrowck/src/nll.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,16 @@ pub(crate) fn compute_regions<'cx, 'tcx>(
209209
}
210210
}
211211

212-
pub(super) fn dump_mir_results<'tcx>(
212+
/// `-Zdump-mir=nll` dumps MIR annotated with NLL specific information:
213+
/// - free regions
214+
/// - inferred region values
215+
/// - region liveness
216+
/// - inference constraints and their causes
217+
///
218+
/// As well as graphviz `.dot` visualizations of:
219+
/// - the region constraints graph
220+
/// - the region SCC graph
221+
pub(super) fn dump_nll_mir<'tcx>(
213222
infcx: &BorrowckInferCtxt<'tcx>,
214223
body: &Body<'tcx>,
215224
regioncx: &RegionInferenceContext<'tcx>,

0 commit comments

Comments
 (0)